Mir

Merge lp:~alan-griffiths/mir/deprecation-macros into lp:mir

Proposed by Alan Griffiths
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 4172
Proposed branch: lp:~alan-griffiths/mir/deprecation-macros
Merge into: lp:mir
Diff against target: 1832 lines (+294/-227)
27 files modified
include/client/mir/event_printer.h (+5/-5)
include/client/mir/events/event_builders.h (+10/-10)
include/client/mir_toolkit/client_types.h (+25/-28)
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/keymap_event.h (+1/-1)
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 (+13/-10)
include/client/mir_toolkit/mir_connection.h (+11/-10)
include/client/mir_toolkit/mir_cursor_configuration.h (+4/-3)
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 (+9/-33)
include/client/mir_toolkit/rs/mir_render_surface.h (+49/-11)
include/core/mir_toolkit/common.h (+8/-6)
include/core/mir_toolkit/deprecations.h (+36/-0)
include/server/mir/shell/basic_window_manager.h (+2/-2)
src/common/events/input_configuration_event.cpp (+1/-3)
src/include/common/mir/events/input_configuration_event.h (+1/-2)
To merge this branch: bzr merge lp:~alan-griffiths/mir/deprecation-macros
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Andreas Pokorny (community) Approve
Mir CI Bot continuous-integration Approve
Review via email: mp+324124@code.launchpad.net

Commit message

Use macros to give better control over the application of deprecations

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

FAILED: Continuous integration, rev:4172
https://mir-jenkins.ubuntu.com/job/mir-ci/3399/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4622/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4751
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4740
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4740
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4654/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4654
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4654/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4654
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4654/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4654
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4654/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/4654
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4654/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4173
https://mir-jenkins.ubuntu.com/job/mir-ci/3400/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4626
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4755
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4744
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4744
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4658/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4658/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4658/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4658/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/4658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4658/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

Minor already existing error in the explanation string:

int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event)
MIR_FOR_REMOVAL_IN_VERSION_1("use make_event with mir_window_event_get_attribute_value instead");

should be

int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event)
MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_event_get_attribute_value with MirWindowEvent instead");

or something like that.

Lgtm otherwise

review: Needs Fixing
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4174
https://mir-jenkins.ubuntu.com/job/mir-ci/3401/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4627
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4756
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4745
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4745
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4659
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4659/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4659
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4659/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4659
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4659/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4659
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4659/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/4659
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4659/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4175
https://mir-jenkins.ubuntu.com/job/mir-ci/3402/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4628
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4757
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4746
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4746
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4660
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4660/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4660
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4660/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4660
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4660/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4660
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4660/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/4660
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4660/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4176
https://mir-jenkins.ubuntu.com/job/mir-ci/3403/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4629
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4758
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4747
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4747
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4661
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4661/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4661
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4661/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4661
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4661/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4661
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4661/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/4661
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4661/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) :
review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

lgtm

review: Approve

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-05-08 03:04:26 +0000
3+++ include/client/mir/event_printer.h 2017-05-18 11:24:43 +0000
4@@ -35,19 +35,19 @@
5 std::ostream& operator<<(std::ostream& out, MirOrientation orientation);
6
7 std::ostream& operator<<(std::ostream& out, MirSurfaceAttrib attribute)
8-__attribute__ ((deprecated("use << with MirWindowAttrib instead")));
9+MIR_FOR_REMOVAL_IN_VERSION_1("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+MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowFocusState instead");
14 std::ostream& operator<<(std::ostream& out, MirWindowFocusState state);
15 std::ostream& operator<<(std::ostream& out, MirSurfaceVisibility state)
16-__attribute__ ((deprecated("use << with MirWindowVisibility instead")));
17+MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowVisibility instead");
18 std::ostream& operator<<(std::ostream& out, MirWindowVisibility state);
19 std::ostream& operator<<(std::ostream& out, MirSurfaceType type)
20-__attribute__ ((deprecated("use << with MirWindowType instead")));
21+MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowType instead");
22 std::ostream& operator<<(std::ostream& out, MirWindowType type);
23 std::ostream& operator<<(std::ostream& out, MirSurfaceState state)
24-__attribute__ ((deprecated("use << with MirWindowState instead")));
25+MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowState instead");
26 std::ostream& operator<<(std::ostream& out, MirWindowState state);
27
28 std::ostream& operator<<(std::ostream& out, MirPromptSessionEvent const& event);
29
30=== modified file 'include/client/mir/events/event_builders.h'
31--- include/client/mir/events/event_builders.h 2017-05-08 03:04:26 +0000
32+++ include/client/mir/events/event_builders.h 2017-05-18 11:24:43 +0000
33@@ -48,7 +48,7 @@
34 EventUPtr make_event(frontend::SurfaceId const& surface_id, geometry::Size const& size);
35 // Surface configure event
36 EventUPtr make_event(frontend::SurfaceId const& surface_id, MirSurfaceAttrib attribute, int value)
37-__attribute__ ((deprecated("use make_event with MirWindowAttribute instead")));
38+MIR_FOR_REMOVAL_IN_VERSION_1("use make_event with MirWindowAttribute instead");
39 // Window configure event
40 EventUPtr make_event(frontend::SurfaceId const& surface_id, MirWindowAttrib attribute, int value);
41 // Close surface event
42@@ -81,12 +81,12 @@
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+ int scan_code, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
48
49 // Deprecated version without mac
50 EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
51 MirKeyboardAction action, xkb_keysym_t key_code,
52- int scan_code, MirInputEventModifiers modifiers) __attribute__ ((deprecated));
53+ int scan_code, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
54
55 // Touch event
56 EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
57@@ -94,11 +94,11 @@
58
59 // Deprecated version with uint64_t mac
60 EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
61- uint64_t mac, MirInputEventModifiers modifiers) __attribute__ ((deprecated));
62+ uint64_t mac, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
63
64 // Deprecated version without mac
65 EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
66- MirInputEventModifiers modifiers) __attribute__ ((deprecated));
67+ MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
68
69 void add_touch(MirEvent &event, MirTouchId touch_id, MirTouchAction action,
70 MirTouchTooltype tooltype, float x_axis_value, float y_axis_value,
71@@ -110,14 +110,14 @@
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+ float hscroll_value, float vscroll_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
77
78 // Deprecated version without relative axis and mac
79 EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
80 MirInputEventModifiers modifiers, MirPointerAction action,
81 MirPointerButtons buttons_pressed,
82 float x_axis_value, float y_axis_value,
83- float hscroll_value, float vscroll_value) __attribute__ ((deprecated));
84+ float hscroll_value, float vscroll_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
85
86 EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
87 std::vector<uint8_t> const& mac, MirInputEventModifiers modifiers, MirPointerAction action,
88@@ -132,7 +132,7 @@
89 MirPointerButtons buttons_pressed,
90 float x_axis_value, float y_axis_value,
91 float hscroll_value, float vscroll_value,
92- float relative_x_value, float relative_y_value) __attribute__ ((deprecated));
93+ float relative_x_value, float relative_y_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
94
95 // Deprecated version without mac
96 EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
97@@ -140,11 +140,11 @@
98 MirPointerButtons buttons_pressed,
99 float x_axis_value, float y_axis_value,
100 float hscroll_value, float vscroll_value,
101- float relative_x_value, float relative_y_value) __attribute__ ((deprecated));
102+ float relative_x_value, float relative_y_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
103
104 // Input configuration event
105 EventUPtr make_event(MirInputConfigurationAction action,
106- MirInputDeviceId id, std::chrono::nanoseconds time) __attribute__((deprecated));
107+ MirInputDeviceId id, std::chrono::nanoseconds time) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
108
109 EventUPtr make_event(std::chrono::nanoseconds timestamp,
110 MirPointerButtons pointer_buttons,
111
112=== modified file 'include/client/mir_toolkit/client_types.h'
113--- include/client/mir_toolkit/client_types.h 2017-05-08 03:04:26 +0000
114+++ include/client/mir_toolkit/client_types.h 2017-05-18 11:24:43 +0000
115@@ -23,6 +23,7 @@
116
117 #include <mir_toolkit/events/event.h>
118 #include <mir_toolkit/common.h>
119+#include <mir_toolkit/deprecations.h>
120
121 #include <stddef.h>
122
123@@ -38,30 +39,29 @@
124 typedef void* MirEGLNativeWindowType;
125 typedef void* MirEGLNativeDisplayType;
126 typedef struct MirConnection MirConnection;
127-typedef struct MirSurface MirSurface __attribute__((deprecated("Use MirWindow instead")));
128+typedef struct MirSurface MirSurface MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindow instead");
129 typedef struct MirSurface MirWindow;
130-typedef struct MirSurfaceSpec MirSurfaceSpec __attribute__((deprecated("Use MirWindowSpec instead")));
131+typedef struct MirSurfaceSpec MirSurfaceSpec MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowSpec instead");
132 typedef struct MirSurfaceSpec MirWindowSpec;
133 typedef struct MirScreencast MirScreencast;
134 typedef struct MirScreencastSpec MirScreencastSpec;
135 typedef struct MirPromptSession MirPromptSession;
136 typedef struct MirBufferStream MirBufferStream;
137-typedef struct MirPersistentId MirPersistentId __attribute((deprecated("Use MirWindowId instead")));
138+typedef struct MirPersistentId MirPersistentId MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowId instead");
139 typedef struct MirPersistentId MirWindowId;
140 typedef struct MirBlob MirBlob;
141 typedef struct MirDisplayConfig MirDisplayConfig;
142 typedef struct MirError MirError;
143 typedef struct MirPresentationChain MirPresentationChain;
144 typedef struct MirBuffer MirBuffer;
145-typedef struct MirRenderSurface MirRenderSurface
146-__attribute__((deprecated("This type is slated for rename due to MirRenderSurface-->MirSurface transition")));
147+typedef struct MirRenderSurface MirRenderSurface;
148
149 /**
150 * Opaque structure containing cursor parameterization. Create with mir_cursor* family.
151 * Used with mir_window_configure_cursor.
152 */
153 typedef struct MirCursorConfiguration MirCursorConfiguration
154- __attribute__((deprecated("Use mir_window_spec_set_cursor_name/mir_window_spec_set_cursor_render_surface instead")));
155+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_name/mir_window_spec_set_cursor_render_surface instead");
156
157 /**
158 * Descriptor for an output connection.
159@@ -89,7 +89,7 @@
160 typedef void (*MirConnectedCallback)(
161 MirConnection *connection, void *client_context);
162 typedef MirConnectedCallback mir_connected_callback
163- __attribute__((deprecated("Use MirConnectedCallback instead")));
164+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirConnectedCallback instead");
165
166 /**
167 * Callback to be passed when calling window functions :
168@@ -109,7 +109,7 @@
169 typedef void (*MirBufferStreamCallback)(
170 MirBufferStream *stream, void *client_context);
171 typedef MirBufferStreamCallback mir_buffer_stream_callback
172- __attribute__((deprecated("Use MirBufferStreamCallback instead")));
173+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirBufferStreamCallback instead");
174
175 /**
176 * Callback for handling of window events.
177@@ -131,7 +131,7 @@
178 typedef void (*MirLifecycleEventCallback)(
179 MirConnection* connection, MirLifecycleState state, void* context);
180 typedef MirLifecycleEventCallback mir_lifecycle_event_callback
181- __attribute__((deprecated("Use MirLifecycleEventCallback instead")));
182+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirLifecycleEventCallback instead");
183
184 /**
185 * Callback called when the server pings for responsiveness testing.
186@@ -143,7 +143,7 @@
187 typedef void (*MirPingEventCallback)(
188 MirConnection* connection, int32_t serial, void* context);
189 typedef MirPingEventCallback mir_ping_event_callback
190- __attribute__((deprecated("Use MirPingEventCallback instead")));
191+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPingEventCallback instead");
192
193 /**
194 * Callback called when a display config change has occurred
195@@ -154,7 +154,7 @@
196 typedef void (*MirDisplayConfigCallback)(
197 MirConnection* connection, void* context);
198 typedef MirDisplayConfigCallback mir_display_config_callback
199- __attribute__((deprecated("Use MirDisplayConfigCallback instead")));
200+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirDisplayConfigCallback instead");
201
202 /**
203 * Callback called when a request for client file descriptors completes
204@@ -169,7 +169,7 @@
205 typedef void (*MirClientFdCallback)(
206 MirPromptSession *prompt_session, size_t count, int const* fds, void* context);
207 typedef MirClientFdCallback mir_client_fd_callback
208- __attribute__((deprecated("Use MirClientFdCallback instead")));
209+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirClientFdCallback instead");
210
211 #pragma GCC diagnostic push
212 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
213@@ -186,7 +186,7 @@
214 {
215 mir_buffer_usage_hardware = 1,
216 mir_buffer_usage_software
217-} MirBufferUsage __attribute__((deprecated("No longer applicable when using MirRenderSurface")));
218+} MirBufferUsage MIR_FOR_REMOVAL_IN_VERSION_1("No longer applicable when using MirRenderSurface");
219
220 /**
221 * MirWindowParameters is the structure of minimum required information that
222@@ -212,7 +212,7 @@
223 * use the value mir_display_output_id_invalid.
224 */
225 uint32_t output_id;
226-} MirSurfaceParameters __attribute__((deprecated("Use mir_window_get apis or listen for attribute events instead")));
227+} MirSurfaceParameters MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_get apis or listen for attribute events instead");
228
229 enum { mir_platform_package_max = 32 };
230
231@@ -225,7 +225,7 @@
232 * \todo This should be removed from the public API at the next API break.
233 */
234 #ifndef __cplusplus
235-__attribute__ ((deprecated))
236+MIR_FOR_REMOVAL_IN_VERSION_1("Use of this type is inherently non-portable")
237 #endif
238 typedef enum MirPlatformType
239 {
240@@ -442,7 +442,7 @@
241 typedef void (*MirScreencastCallback)(
242 MirScreencast *screencast, void *client_context);
243 typedef MirScreencastCallback mir_screencast_callback
244- __attribute__((deprecated("Use MirScreencastCallback instead")));
245+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirScreencastCallback instead");
246
247 /**
248 * Callback member of MirPromptSession for handling of prompt sessions.
249@@ -452,7 +452,7 @@
250 typedef void (*MirPromptSessionCallback)(
251 MirPromptSession* prompt_provider, void* context);
252 typedef MirPromptSessionCallback mir_prompt_session_callback
253- __attribute__((deprecated("Use MirPromptSessionCallback instead")));
254+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPromptSessionCallback instead");
255
256 /**
257 * Callback member of MirPromptSession for handling of prompt sessions events.
258@@ -465,7 +465,7 @@
259 void* context);
260 typedef MirPromptSessionStateChangeCallback
261 mir_prompt_session_state_change_callback
262- __attribute__((deprecated("Use MirPromptSessionStateChangeCallback instead")));
263+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPromptSessionStateChangeCallback instead");
264
265 /**
266 * Callback called when a platform operation completes.
267@@ -480,7 +480,7 @@
268 typedef void (*MirPlatformOperationCallback)(
269 MirConnection* connection, MirPlatformMessage* reply, void* context);
270 typedef MirPlatformOperationCallback mir_platform_operation_callback
271- __attribute__((deprecated("Use MirPlatformOperationCallback instead")));
272+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPlatformOperationCallback instead");
273
274 /**
275 * Callback called when a change of input devices has occurred
276@@ -492,7 +492,7 @@
277 typedef void (*MirInputConfigCallback)(
278 MirConnection* connection, void* context);
279 typedef MirInputConfigCallback mir_input_config_callback
280- __attribute__((deprecated("Use MirInputConfigCallback instead")));
281+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirInputConfigCallback instead");
282
283 typedef void (*MirBufferCallback)(MirBuffer*, void* context);
284
285@@ -562,27 +562,24 @@
286 typedef void (*MirErrorCallback)(
287 MirConnection* connection, MirError const* error, void* context);
288 typedef MirErrorCallback mir_error_callback
289- __attribute__((deprecated("Use MirErrorCallback instead")));
290+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirErrorCallback instead");
291
292 #pragma GCC diagnostic push
293 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
294
295 typedef void (*mir_surface_callback)(MirSurface *surface, void *client_context)
296-__attribute__((deprecated("Use MirWindowCallback instead")));
297+MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowCallback instead");
298
299 typedef void (*mir_surface_event_callback)(
300 MirSurface* surface, MirEvent const* event, void* context)
301-__attribute__((deprecated("Use MirWindowEventCallback instead")));
302+MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowEventCallback instead");
303
304 typedef void (*mir_surface_id_callback)(
305 MirSurface* surface, MirPersistentId* id, void* context)
306-__attribute__((deprecated("Use MirWindowIdCallback instead")));
307-
308-typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context)
309-__attribute__((deprecated("This type is slated for rename due to MirRenderSurface-->MirSurface transition")));
310+MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowIdCallback instead");
311
312 typedef MirSurfaceParameters MirWindowParameters
313-__attribute__((deprecated("Use mir_window_get_xxx apis or listen for attribute events instead")));
314+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_get_xxx apis or listen for attribute events instead");
315
316 #pragma GCC diagnostic pop
317
318
319=== modified file 'include/client/mir_toolkit/debug/surface.h'
320--- include/client/mir_toolkit/debug/surface.h 2017-05-08 03:04:26 +0000
321+++ include/client/mir_toolkit/debug/surface.h 2017-05-18 11:24:43 +0000
322@@ -19,6 +19,7 @@
323 #define MIR_CLIENT_LIBRARY_DEBUG_H
324
325 #include <mir_toolkit/mir_client_library.h>
326+#include <mir_toolkit/deprecations.h>
327
328 /* This header defines debug interfaces that aren't expected to be generally useful
329 * and do not have the same API-stability guarantees that the main API has */
330@@ -65,13 +66,13 @@
331 bool mir_debug_surface_coords_to_screen(MirSurface *surface,
332 int x, int y,
333 int* screen_x, int* screen_y)
334-__attribute__((deprecated("Use mir_extension_window_coordinate_translation instead")));
335+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_extension_window_coordinate_translation instead");
336
337 int mir_debug_surface_id(MirSurface *surface)
338-__attribute__((deprecated("Use mir_debug_window_id() instead")));
339+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_debug_window_id() instead");
340
341 uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface)
342-__attribute__((deprecated("Use mir_debug_window_current_buffer_id() instead")));
343+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_debug_window_current_buffer_id() instead");
344
345 #pragma GCC diagnostic pop
346
347
348=== modified file 'include/client/mir_toolkit/events/event.h'
349--- include/client/mir_toolkit/events/event.h 2017-05-08 03:04:26 +0000
350+++ include/client/mir_toolkit/events/event.h 2017-05-18 11:24:43 +0000
351@@ -22,6 +22,7 @@
352 #include <stddef.h>
353 #include <stdint.h>
354 #include "mir_toolkit/common.h"
355+#include <mir_toolkit/deprecations.h>
356
357 #ifdef __cplusplus
358 /**
359@@ -58,24 +59,24 @@
360 #pragma GCC diagnostic pop
361
362 typedef struct MirSurfaceEvent MirSurfaceEvent
363- __attribute__ ((deprecated("use MirWindowEvent instead")));
364+ MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowEvent instead");
365 typedef struct MirSurfaceEvent MirWindowEvent;
366 typedef struct MirResizeEvent MirResizeEvent;
367 typedef struct MirPromptSessionEvent MirPromptSessionEvent;
368 typedef struct MirOrientationEvent MirOrientationEvent;
369 typedef struct MirCloseSurfaceEvent MirCloseSurfaceEvent
370- __attribute__ ((deprecated("use MirCloseWindowEvent instead")));
371+ MIR_FOR_REMOVAL_IN_VERSION_1("use MirCloseWindowEvent instead");
372 typedef struct MirCloseSurfaceEvent MirCloseWindowEvent;
373 typedef struct MirInputEvent MirInputEvent;
374 typedef struct MirKeymapEvent MirKeymapEvent;
375 typedef struct MirInputConfigurationEvent MirInputConfigurationEvent
376- __attribute__ ((deprecated("Use MirInputDeviceStateEvent and the MirInputConfig callback instead")));
377+ MIR_FOR_REMOVAL_IN_VERSION_1("Use MirInputDeviceStateEvent and the MirInputConfig callback instead");
378 typedef struct MirSurfaceOutputEvent MirSurfaceOutputEvent
379- __attribute__ ((deprecated("use MirWindowOutputEvent instead")));
380+ MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowOutputEvent instead");
381 typedef struct MirSurfaceOutputEvent MirWindowOutputEvent;
382 typedef struct MirInputDeviceStateEvent MirInputDeviceStateEvent;
383 typedef struct MirSurfacePlacementEvent MirSurfacePlacementEvent
384- __attribute__ ((deprecated("use MirWindowPlacementEvent instead")));
385+ MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowPlacementEvent instead");
386 typedef struct MirSurfacePlacementEvent MirWindowPlacementEvent;
387
388 typedef struct MirCookie MirCookie;
389@@ -136,7 +137,7 @@
390 * \return The associated MirSurfaceEvent
391 */
392 MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* event)
393-__attribute__ ((deprecated("use mir_event_get_window_event instead")));
394+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_event instead");
395
396 /**
397 * Retrieve the MirWindowEvent associated with a MirEvent of
398@@ -195,7 +196,7 @@
399 * \return The associated MirCloseSurfaceEvent
400 */
401 /// @cond
402-__attribute__ ((deprecated))
403+MIR_FOR_REMOVAL_IN_VERSION_1("Use of this function is pointless as there is no way to use the return value")
404 /// @endcond
405 MirCloseSurfaceEvent const* mir_event_get_close_surface_event(MirEvent const* event);
406 #pragma GCC diagnostic pop
407@@ -223,7 +224,7 @@
408 * \return The associated MirInputConfigurationEvent
409 */
410 /// @cond
411-__attribute__((deprecated))
412+MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback")
413 /// @endcond
414 MirInputConfigurationEvent const* mir_event_get_input_configuration_event(MirEvent const* event);
415 #pragma GCC diagnostic pop
416@@ -242,7 +243,7 @@
417 * \return The associated MirSurfaceOutputEvent
418 */
419 MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* event)
420-__attribute__((deprecated("use mir_event_get_window_output_event")));
421+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_output_event");
422
423 /**
424 * Retrieve the MirWindowOutputEvent associated with a MirEvent of type
425@@ -279,7 +280,7 @@
426 * \return The associated MirSurfacePlacementEvent
427 */
428 MirSurfacePlacementEvent const* mir_event_get_surface_placement_event(MirEvent const* event)
429-__attribute__((deprecated("use mir_event_get_window_placement_event")));
430+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_placement_event");
431
432 /**
433 * Retrieve the MirWindowPlacementEvent associated with a MirEvent of
434
435=== modified file 'include/client/mir_toolkit/events/input_configuration_event.h'
436--- include/client/mir_toolkit/events/input_configuration_event.h 2017-05-08 03:04:26 +0000
437+++ include/client/mir_toolkit/events/input_configuration_event.h 2017-05-18 11:24:43 +0000
438@@ -20,6 +20,7 @@
439 #define MIR_TOOLKIT_EVENTS_INPUT_CONFIGURATION_EVENT_H_
440
441 #include <mir_toolkit/events/event.h>
442+#include <mir_toolkit/deprecations.h>
443
444 #ifdef __cplusplus
445 /**
446@@ -45,7 +46,7 @@
447 mir_input_configuration_action_configuration_changed,
448 mir_input_configuration_action_device_reset
449 } MirInputConfigurationAction
450-__attribute__((deprecated));
451+MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
452
453 #pragma GCC diagnostic push
454 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
455@@ -55,7 +56,8 @@
456 * \param[in] ev The input configuration event
457 * \return The action
458 */
459-MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const* ev) __attribute__((deprecated));
460+MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const* ev)
461+MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
462
463 /**
464 * Retreive the time associated with a MirInputConfiguration event
465@@ -63,7 +65,8 @@
466 * \param[in] ev The input configuration event
467 * \return The time in nanoseconds since epoch
468 */
469-int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const* ev) __attribute__((deprecated));
470+int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const* ev)
471+MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
472
473 /**
474 * Retreive the device id associated with a MirInputConfiguration event
475@@ -71,7 +74,8 @@
476 * \param[in] ev The input configuration event
477 * \return The device id or -1 if not applicable to events of this action
478 */
479-MirInputDeviceId mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const* ev) __attribute__((deprecated));
480+MirInputDeviceId mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const* ev)
481+MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
482 #pragma GCC diagnostic pop
483
484 #ifdef __cplusplus
485
486=== modified file 'include/client/mir_toolkit/events/keymap_event.h'
487--- include/client/mir_toolkit/events/keymap_event.h 2017-05-08 03:04:26 +0000
488+++ include/client/mir_toolkit/events/keymap_event.h 2017-05-18 11:24:43 +0000
489@@ -42,7 +42,7 @@
490 */
491 void mir_keymap_event_get_rules(MirKeymapEvent const* ev,
492 struct xkb_rule_names* rules)
493- __attribute__ ((deprecated));
494+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_keymap_event_get_keymap_buffer() instead");
495
496 /**
497 * Retrieve the new keymap reported by this MirKeymapEvent
498
499=== modified file 'include/client/mir_toolkit/events/surface_event.h'
500--- include/client/mir_toolkit/events/surface_event.h 2017-05-08 03:04:26 +0000
501+++ include/client/mir_toolkit/events/surface_event.h 2017-05-18 11:24:43 +0000
502@@ -20,6 +20,7 @@
503 #define MIR_TOOLKIT_EVENTS_SURFACE_EVENT_H_
504
505 #include <mir_toolkit/events/event.h>
506+#include <mir_toolkit/deprecations.h>
507
508 #ifdef __cplusplus
509 /**
510@@ -39,7 +40,7 @@
511 * \return The associated attribute
512 */
513 MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* event)
514-__attribute__ ((deprecated("use mir_window_event_get_attribute instead")));
515+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_event_get_attribute instead");
516
517 /**
518 * Retrieve the new value of the associated attribute for a given MirSurfaceEvent
519@@ -48,7 +49,7 @@
520 * \return The associated attribute value
521 */
522 int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event)
523-__attribute__ ((deprecated("use make_event with mir_window_event_get_attribute_value instead")));
524+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_event_get_attribute_value with MirWindowEvent instead");
525 #pragma GCC diagnostic pop
526
527 #ifdef __cplusplus
528
529=== modified file 'include/client/mir_toolkit/events/surface_output_event.h'
530--- include/client/mir_toolkit/events/surface_output_event.h 2017-05-08 03:04:26 +0000
531+++ include/client/mir_toolkit/events/surface_output_event.h 2017-05-18 11:24:43 +0000
532@@ -20,6 +20,7 @@
533 #define MIR_TOOLKIT_SURFACE_OUTPUT_EVENT_H_
534
535 #include <mir_toolkit/events/event.h>
536+#include <mir_toolkit/deprecations.h>
537
538 #ifdef __cplusplus
539 /**
540@@ -39,7 +40,7 @@
541 * \return The new DPI value for the surface is primarily on.
542 */
543 int mir_surface_output_event_get_dpi(MirSurfaceOutputEvent const* ev)
544-__attribute__ ((deprecated("use mir_window_output_event_get_dpi instead")));
545+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_dpi instead");
546
547 /**
548 * Retrieve the form factor of the new output configuration of a MirSurfaceOutputEvent
549@@ -48,7 +49,7 @@
550 * \return The new form factor of the output the surface is primarily on.
551 */
552 MirFormFactor mir_surface_output_event_get_form_factor(MirSurfaceOutputEvent const* ev)
553-__attribute__ ((deprecated("use mir_window_output_event_get_form_factor instead")));
554+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_form_factor instead");
555
556 /**
557 * Retrieve the suggested scaling factor of the new output configuration of a
558@@ -58,7 +59,7 @@
559 * \return The new scaling factor of the output the surface is primarily on.
560 */
561 float mir_surface_output_event_get_scale(MirSurfaceOutputEvent const* ev)
562-__attribute__ ((deprecated("use mir_window_output_event_get_scale instead")));
563+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_scale instead");
564
565 /**
566 * Retrieve the maximum refresh rate of the output(s) associated with a
567@@ -70,7 +71,7 @@
568 * \return The refresh rate in Hz
569 */
570 double mir_surface_output_event_get_refresh_rate(MirSurfaceOutputEvent const* ev)
571-__attribute__ ((deprecated("use mir_window_output_event_get_refresh_rate instead")));
572+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_refresh_rate instead");
573
574 /**
575 * Retrieve the ID of the output this surface is on from a MirSurfaceOutputEvent
576@@ -80,7 +81,7 @@
577 * (From MirDisplayOutput::output_id)
578 */
579 uint32_t mir_surface_output_event_get_output_id(MirSurfaceOutputEvent const *ev)
580-__attribute__ ((deprecated("use mir_window_output_event_get_output_id instead")));
581+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_output_id instead");
582
583 #pragma GCC diagnostic pop
584
585
586=== modified file 'include/client/mir_toolkit/events/surface_placement.h'
587--- include/client/mir_toolkit/events/surface_placement.h 2017-05-08 03:04:26 +0000
588+++ include/client/mir_toolkit/events/surface_placement.h 2017-05-18 11:24:43 +0000
589@@ -20,6 +20,7 @@
590 #define MIR_TOOLKIT_SURFACE_PLACEMENT_H_
591
592 #include <mir_toolkit/client_types.h>
593+#include <mir_toolkit/deprecations.h>
594
595 #ifdef __cplusplus
596 /**
597@@ -38,7 +39,7 @@
598 * \return The position relative to the parent surface
599 */
600 MirRectangle mir_surface_placement_get_relative_position(MirSurfacePlacementEvent const* event)
601-__attribute__ ((deprecated("use mir_window_placement_get_relative_position instead")));
602+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_placement_get_relative_position instead");
603
604 #ifdef __cplusplus
605 }
606
607=== modified file 'include/client/mir_toolkit/mir_blob.h'
608--- include/client/mir_toolkit/mir_blob.h 2017-05-08 03:04:26 +0000
609+++ include/client/mir_toolkit/mir_blob.h 2017-05-18 11:24:43 +0000
610@@ -19,6 +19,7 @@
611 #define MIR_TOOLKIT_MIR_BLOB_H_
612
613 #include <mir_toolkit/client_types.h>
614+#include <mir_toolkit/deprecations.h>
615
616 #ifdef __cplusplus
617 /**
618@@ -35,7 +36,7 @@
619 * \return A blob
620 */
621 MirBlob* mir_blob_from_display_configuration(MirDisplayConfiguration* configuration)
622-__attribute__ ((deprecated("use mir_blob_from_display_config instead")));
623+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_blob_from_display_config instead");
624
625 /**
626 * Create a blob from a display config
627@@ -65,7 +66,7 @@
628 * \return A display configuration
629 */
630 MirDisplayConfiguration* mir_blob_to_display_configuration(MirBlob* blob)
631-__attribute__ ((deprecated("use mir_blob_to_display_config instead")));
632+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_blob_to_display_config instead");
633
634 /**
635 * Create a blob from a display config
636
637=== modified file 'include/client/mir_toolkit/mir_buffer_stream.h'
638--- include/client/mir_toolkit/mir_buffer_stream.h 2017-05-17 04:48:46 +0000
639+++ include/client/mir_toolkit/mir_buffer_stream.h 2017-05-18 11:24:43 +0000
640@@ -20,6 +20,7 @@
641
642 #include <mir_toolkit/mir_native_buffer.h>
643 #include <mir_toolkit/client_types.h>
644+#include <mir_toolkit/deprecations.h>
645
646 #ifdef __cplusplus
647 /**
648@@ -79,7 +80,7 @@
649 MirBufferUsage buffer_usage,
650 MirBufferStreamCallback callback,
651 void* context)
652-__attribute__ ((deprecated("Use mir_render_surface_get_buffer_stream instead")));
653+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_render_surface_get_buffer_stream instead");
654 #pragma GCC diagnostic pop
655
656 /**
657@@ -105,7 +106,7 @@
658 int width, int height,
659 MirPixelFormat format,
660 MirBufferUsage buffer_usage)
661-__attribute__ ((deprecated("Use mir_render_surface_get_buffer_stream instead")));
662+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_render_surface_get_buffer_stream instead");
663 #pragma GCC diagnostic pop
664 /**
665 * Release the supplied stream and any associated buffer. The returned wait
666@@ -125,7 +126,7 @@
667 MirBufferStream * buffer_stream,
668 MirBufferStreamCallback callback,
669 void *context)
670-__attribute__ ((deprecated));
671+MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.");
672
673 /**
674 * Release the specified buffer stream like in mir,_buffer_stream_release(),
675@@ -134,7 +135,7 @@
676 * \param [in] buffer_stream The buffer stream to be released
677 */
678 void mir_buffer_stream_release_sync(MirBufferStream *buffer_stream)
679-__attribute__ ((deprecated));
680+MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.");
681
682 /**
683 * Get the underlying platform type so the buffer obtained in "raw"
684@@ -155,7 +156,8 @@
685 * mir_platform_type_gbm
686 */
687 MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream)
688- __attribute__ ((deprecated));
689+MIR_FOR_REMOVAL_IN_VERSION_1("To identify the graphics platform use mir_connection_get_graphics_module(). \n"
690+ "To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region()");
691
692 /**
693 * Retrieve the current buffer in "raw" representation.
694@@ -166,7 +168,7 @@
695 */
696 void mir_buffer_stream_get_current_buffer(MirBufferStream *buffer_stream,
697 MirNativeBuffer **buffer_package)
698-__attribute__ ((deprecated("Use platform specific buffer extensions instead")));
699+MIR_FOR_REMOVAL_IN_VERSION_1("Use platform specific buffer extensions instead");
700
701 /**
702 * Advance a buffer stream's buffer. The returned handle remains valid until the
703@@ -185,7 +187,8 @@
704 MirBufferStream *buffer_stream,
705 MirBufferStreamCallback callback,
706 void *context)
707-__attribute__ ((deprecated("For non-blocking swaps use mir_buffer_stream_swap_buffers_sync with an interval of zero. And a client API for manual vsync will soon be available.")));
708+MIR_FOR_REMOVAL_IN_VERSION_1("For non-blocking swaps use mir_buffer_stream_swap_buffers_sync with an interval of zero."
709+ " And a client API for manual vsync will soon be available.");
710
711 /**
712 * Advance a buffer stream's buffer as in mir_buffer stream_swap_buffers(),
713@@ -215,7 +218,7 @@
714 * \return An EGLNativeWindowType that the client can use
715 */
716 MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream *buffer_stream)
717-__attribute__ ((deprecated("Use MirRenderSurface *as the window type")));
718+MIR_FOR_REMOVAL_IN_VERSION_1("Use MirRenderSurface *as the window type");
719
720 /**
721 * Set the scale associated with all buffers in the stream
722@@ -225,7 +228,7 @@
723 * \return A handle that can be passed to mir_wait_for
724 */
725 MirWaitHandle *mir_buffer_stream_set_scale(MirBufferStream* buffer_stream, float scale)
726-__attribute__ ((deprecated));
727+MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface");
728
729 /**
730 * Set the scale as in mir_buffer_stream_set_scale(), but also wait for the
731@@ -234,7 +237,7 @@
732 * \param [in] scale The scale
733 */
734 void mir_buffer_stream_set_scale_sync(MirBufferStream* buffer_stream, float scale)
735-__attribute__ ((deprecated));
736+MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface");
737
738 /**
739 * Set the swapinterval for the stream.
740
741=== modified file 'include/client/mir_toolkit/mir_connection.h'
742--- include/client/mir_toolkit/mir_connection.h 2017-05-08 03:04:26 +0000
743+++ include/client/mir_toolkit/mir_connection.h 2017-05-18 11:24:43 +0000
744@@ -20,6 +20,7 @@
745
746 #include <mir_toolkit/client_types.h>
747 #include <mir_toolkit/common.h>
748+#include <mir_toolkit/deprecations.h>
749
750 #include <stdbool.h>
751
752@@ -93,7 +94,7 @@
753 * \param [out] platform_package Structure to be populated
754 */
755 void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package)
756-__attribute__((deprecated("use platform extensions instead")));
757+MIR_FOR_REMOVAL_IN_VERSION_1("use platform extensions instead");
758
759 /**
760 * Query graphics platform module.
761@@ -105,7 +106,7 @@
762 * \param [out] properties Structure to be populated
763 */
764 void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties)
765-__attribute__((deprecated("use graphics module extension instead")));
766+MIR_FOR_REMOVAL_IN_VERSION_1("use graphics module extension instead");
767
768 /**
769 * Register a callback to be called when a Lifecycle state change occurs.
770@@ -156,7 +157,7 @@
771 * \return structure that describes the display configuration
772 */
773 MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection)
774-__attribute__ ((deprecated("use mir_connection_create_display_configuration instead")));
775+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_create_display_configuration instead");
776
777 /**
778 * Query the display
779@@ -188,7 +189,7 @@
780 * \param [in] display_configuration The display_configuration information resource to be destroyed
781 */
782 void mir_display_config_destroy(MirDisplayConfiguration* display_configuration)
783-__attribute__ ((deprecated("use mir_display_config_release instead")));
784+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_display_config_release instead");
785
786 /**
787 * Apply the display configuration
788@@ -204,7 +205,7 @@
789 * \return A handle that can be passed to mir_wait_for
790 */
791 MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration)
792-__attribute__ ((deprecated("use mir_connection_apply_session_display_config instead")));
793+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_apply_session_display_config instead");
794
795 /**
796 * Apply the display config for the connection
797@@ -254,7 +255,7 @@
798 MirWaitHandle* mir_connection_set_base_display_config(
799 MirConnection* connection,
800 MirDisplayConfiguration const* display_configuration)
801-__attribute__ ((deprecated("use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration")));
802+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration");
803
804
805 /**
806@@ -333,7 +334,7 @@
807 * \return An EGLNativeDisplayType that the client can use
808 */
809 MirEGLNativeDisplayType mir_connection_get_egl_native_display(MirConnection *connection)
810-__attribute__((deprecated("Use MirConnection * as the native display instead")));
811+MIR_FOR_REMOVAL_IN_VERSION_1("Use MirConnection * as the native display instead");
812
813 /**
814 * Get the exact MirPixelFormat to use in creating a surface for a chosen
815@@ -346,7 +347,7 @@
816 */
817 MirPixelFormat mir_connection_get_egl_pixel_format(
818 MirConnection *connection, void *egldisplay, void *eglconfig)
819-__attribute__((deprecated("Use EGL directly, the EGL implementation will now set correct pixel format")));
820+MIR_FOR_REMOVAL_IN_VERSION_1("Use EGL directly, the EGL implementation will now set correct pixel format");
821
822 /**
823 * Get the list of possible formats that a surface can be created with.
824@@ -383,7 +384,7 @@
825 MirConnection* connection,
826 MirPlatformMessage const* request,
827 MirPlatformOperationCallback callback, void* context)
828-__attribute__ ((deprecated("use platform specific extensions instead")));
829+MIR_FOR_REMOVAL_IN_VERSION_1("use platform specific extensions instead");
830
831 /**
832 * Create a snapshot of the attached input devices and device configurations.
833@@ -441,7 +442,7 @@
834 * \param [in] config The input configuration
835 */
836 void mir_input_config_destroy(MirInputConfig const* config)
837-__attribute__ ((deprecated("use mir_input_config_release instead")));
838+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_input_config_release instead");
839
840 /**
841 * Release this snapshot of the input configuration.
842
843=== modified file 'include/client/mir_toolkit/mir_cursor_configuration.h'
844--- include/client/mir_toolkit/mir_cursor_configuration.h 2017-05-08 03:04:26 +0000
845+++ include/client/mir_toolkit/mir_cursor_configuration.h 2017-05-18 11:24:43 +0000
846@@ -20,6 +20,7 @@
847
848 #include <mir_toolkit/common.h>
849 #include <mir_toolkit/client_types.h>
850+#include <mir_toolkit/deprecations.h>
851
852 #ifdef __cplusplus
853 /**
854@@ -37,7 +38,7 @@
855 * \param [in] parameters The operand
856 */
857 void mir_cursor_configuration_destroy(MirCursorConfiguration *parameters)
858-__attribute__((deprecated("MirCursorConfiguration is deprecated")));
859+MIR_FOR_REMOVAL_IN_VERSION_1("MirCursorConfiguration is deprecated");
860
861 /**
862 * Returns a new MirCursorConfiguration representing a named cursor
863@@ -51,7 +52,7 @@
864 * to_mir_cursor_configuration_destroy
865 */
866 MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name)
867-__attribute__((deprecated("Use mir_window_spec_set_cursor_name instead")));
868+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_name() instead");
869
870 /**
871 * Returns a new cursor configuration tied to a given buffer stream.
872@@ -66,7 +67,7 @@
873 */
874 MirCursorConfiguration *mir_cursor_configuration_from_buffer_stream(MirBufferStream const* stream, int hotspot_x,
875 int hotspot_y)
876-__attribute__((deprecated("Use mir_window_spec_set_cursor_render_surface instead")));
877+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_render_surface instead");
878
879 #pragma GCC diagnostic pop
880 #ifdef __cplusplus
881
882=== modified file 'include/client/mir_toolkit/mir_display_configuration.h'
883--- include/client/mir_toolkit/mir_display_configuration.h 2017-05-08 03:04:26 +0000
884+++ include/client/mir_toolkit/mir_display_configuration.h 2017-05-18 11:24:43 +0000
885@@ -20,6 +20,7 @@
886 #define MIR_TOOLKIT_MIR_DISPLAY_CONFIGURATION_H_
887
888 #include "client_types.h"
889+#include <mir_toolkit/deprecations.h>
890
891 #ifdef __cplusplus
892 extern "C" {
893@@ -60,7 +61,7 @@
894 */
895 int mir_display_config_get_max_simultaneous_outputs(
896 MirDisplayConfig const* config)
897- __attribute__((deprecated("Not accurate in Mir 0.26 and later. May be removed in future.")));
898+ MIR_FOR_REMOVAL_IN_VERSION_1("Not accurate in Mir 0.26 and later. May be removed in future.");
899
900 /**
901 * Get the number of outputs available in this display configuration.
902@@ -268,7 +269,7 @@
903 * \returns The name of the output type.
904 */
905 char const* mir_display_output_type_name(MirDisplayOutputType type)
906-__attribute__((deprecated("use mir_output_type_name instead")));
907+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_output_type_name instead");
908
909 /**
910 * Get the textual name of an output type.
911
912=== modified file 'include/client/mir_toolkit/mir_persistent_id.h'
913--- include/client/mir_toolkit/mir_persistent_id.h 2017-03-16 09:12:12 +0000
914+++ include/client/mir_toolkit/mir_persistent_id.h 2017-05-18 11:24:43 +0000
915@@ -19,6 +19,7 @@
916 #define MIR_TOOLKIT_MIR_PERSISTENT_ID_H_
917
918 #include <mir_toolkit/client_types.h>
919+#include <mir_toolkit/deprecations.h>
920
921 #include <stdbool.h>
922
923@@ -39,7 +40,7 @@
924 * \note This does not guarantee that the ID refers to a currently valid object.
925 */
926 bool mir_persistent_id_is_valid(MirPersistentId* id)
927-__attribute__((deprecated("Use mir_window_id_is_valid() instead")));
928+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_is_valid() instead");
929
930 /**
931 * \brief Free a MirPersistentId
932@@ -48,7 +49,7 @@
933 * object referred to by \arg id.
934 */
935 void mir_persistent_id_release(MirPersistentId* id)
936-__attribute__((deprecated("Use mir_window_id_release() instead")));
937+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_release() instead");
938
939 /**
940 * \brief Get a string representation of a MirSurfaceId
941@@ -59,7 +60,7 @@
942 * \see mir_surface_id_from_string
943 */
944 char const* mir_persistent_id_as_string(MirPersistentId* id)
945-__attribute__((deprecated("Use mir_window_id_as_string() instead")));
946+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_as_string() instead");
947
948 /**
949 * \brief Deserialise a string representation of a MirSurfaceId
950@@ -67,7 +68,7 @@
951 * \return The deserialised MirSurfaceId
952 */
953 MirPersistentId* mir_persistent_id_from_string(char const* string_representation)
954-__attribute__((deprecated("Use mir_window_id_from_string() instead")));
955+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_from_string() instead");
956
957 #pragma GCC diagnostic pop
958
959
960=== modified file 'include/client/mir_toolkit/mir_platform_message.h'
961--- include/client/mir_toolkit/mir_platform_message.h 2017-05-08 03:04:26 +0000
962+++ include/client/mir_toolkit/mir_platform_message.h 2017-05-18 11:24:43 +0000
963@@ -19,6 +19,7 @@
964 #define MIR_TOOLKIT_MIR_PLATFORM_MESSAGE_H_
965
966 #include <sys/types.h>
967+#include <mir_toolkit/deprecations.h>
968
969 #ifdef __cplusplus
970 /**
971@@ -51,7 +52,7 @@
972 * \param [in] opcode The platform message opcode
973 * \return The created MirPlatformMessage
974 */
975-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
976+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
977 MirPlatformMessage* mir_platform_message_create(unsigned int opcode);
978
979 /**
980@@ -59,7 +60,7 @@
981 *
982 * \param [in] message The MirPlatformMessage
983 */
984-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
985+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
986 void mir_platform_message_release(MirPlatformMessage const* message);
987
988 /**
989@@ -71,7 +72,7 @@
990 * \param [in] data Pointer to the data
991 * \param [in] data_size The size of the data in bytes
992 */
993-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
994+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
995 void mir_platform_message_set_data(MirPlatformMessage* message, void const* data, size_t data_size);
996
997 /**
998@@ -89,7 +90,7 @@
999 * \param [in] fds Pointer to the array of fds
1000 * \param [in] num_fds The number of fds
1001 */
1002-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
1003+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
1004 void mir_platform_message_set_fds(MirPlatformMessage* message, int const* fds, size_t num_fds);
1005
1006 /**
1007@@ -98,7 +99,7 @@
1008 * \param [in] message The MirPlatformMessage
1009 * \return The opcode
1010 */
1011-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
1012+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
1013 unsigned int mir_platform_message_get_opcode(MirPlatformMessage const* message);
1014
1015 /**
1016@@ -111,7 +112,7 @@
1017 * \param [in] message The MirPlatformMessage
1018 * \return The data
1019 */
1020-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
1021+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
1022 MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const* message);
1023
1024 /**
1025@@ -128,7 +129,7 @@
1026 * \param [in] message The MirPlatformMessage
1027 * \return The fds
1028 */
1029-__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))
1030+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
1031 MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const* message);
1032
1033 #ifdef __cplusplus
1034
1035=== modified file 'include/client/mir_toolkit/mir_screencast.h'
1036--- include/client/mir_toolkit/mir_screencast.h 2017-05-08 03:04:26 +0000
1037+++ include/client/mir_toolkit/mir_screencast.h 2017-05-18 11:24:43 +0000
1038@@ -18,6 +18,7 @@
1039 #define MIR_TOOLKIT_MIR_SCREENCAST_H_
1040
1041 #include <mir_toolkit/client_types.h>
1042+#include <mir_toolkit/deprecations.h>
1043
1044 #ifdef __cplusplus
1045 /**
1046@@ -143,7 +144,7 @@
1047 MirScreencast* mir_connection_create_screencast_sync(
1048 MirConnection* connection,
1049 MirScreencastParameters* parameters)
1050-__attribute__ ((deprecated("use mir_screencast_create_sync instead")));
1051+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_screencast_create_sync instead");
1052
1053 /**
1054 * Release the specified screencast.
1055
1056=== modified file 'include/client/mir_toolkit/mir_surface.h'
1057--- include/client/mir_toolkit/mir_surface.h 2017-05-08 03:04:26 +0000
1058+++ include/client/mir_toolkit/mir_surface.h 2017-05-18 11:24:43 +0000
1059@@ -22,6 +22,7 @@
1060 #include <mir_toolkit/client_types.h>
1061 #include <mir_toolkit/common.h>
1062 #include <mir_toolkit/mir_cursor_configuration.h>
1063+#include <mir_toolkit/deprecations.h>
1064
1065 #include <stdbool.h>
1066
1067@@ -40,7 +41,7 @@
1068 MirSurfaceSpec* mir_connection_create_spec_for_normal_surface(MirConnection* connection,
1069 int width, int height,
1070 MirPixelFormat format)
1071-__attribute__((deprecated("Use mir_create_normal_window_spec() instead")));
1072+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_normal_window_spec() instead");
1073
1074 MirSurfaceSpec*
1075 mir_connection_create_spec_for_menu(MirConnection* connection,
1076@@ -50,7 +51,7 @@
1077 MirSurface* parent,
1078 MirRectangle* rect,
1079 MirEdgeAttachment edge)
1080-__attribute__((deprecated("Use mir_specify_menu() instead")));
1081+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_specify_menu() instead");
1082
1083 MirSurfaceSpec*
1084 mir_connection_create_spec_for_tooltip(MirConnection* connection,
1085@@ -58,7 +59,7 @@
1086 MirPixelFormat format,
1087 MirSurface* parent,
1088 MirRectangle* zone)
1089-__attribute__((deprecated("Use mir_create_tip_window_spec() instead")));
1090+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_tip_window_spec() instead");
1091
1092 MirSurfaceSpec*
1093 mir_connection_create_spec_for_tip(MirConnection* connection,
1094@@ -67,30 +68,30 @@
1095 MirSurface* parent,
1096 MirRectangle* rect,
1097 MirEdgeAttachment edge)
1098-__attribute__((deprecated("Use mir_create_tip_window_spec() instead")));
1099+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_tip_window_spec() instead");
1100
1101 MirSurfaceSpec*
1102 mir_connection_create_spec_for_modal_dialog(MirConnection* connection,
1103 int width, int height,
1104 MirPixelFormat format,
1105 MirSurface* parent)
1106-__attribute__((deprecated("Use mir_create_modal_dialog_window_spec() instead")));
1107+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_modal_dialog_window_spec() instead");
1108
1109 MirSurfaceSpec*
1110 mir_connection_create_spec_for_dialog(MirConnection* connection,
1111 int width, int height,
1112 MirPixelFormat format)
1113-__attribute__((deprecated("Use mir_create_dialog_window_spec() instead")));
1114+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_dialog_window_spec() instead");
1115
1116 MirSurfaceSpec* mir_create_surface_spec(MirConnection* connection)
1117-__attribute__((deprecated("Use mir_create_window_spec() instead")));
1118+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_window_spec() instead");
1119
1120 MirSurfaceSpec*
1121 mir_connection_create_spec_for_changes(MirConnection* connection)
1122-__attribute__((deprecated("Use mir_create_window_spec() instead")));
1123+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_window_spec() instead");
1124
1125 void mir_surface_spec_set_parent(MirSurfaceSpec* spec, MirSurface* parent)
1126-__attribute__((deprecated("Use mir_window_spec_set_parent() instead")));
1127+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_parent() instead");
1128
1129 /**
1130 *\deprecated This will soon be a property of the backing content.
1131@@ -103,77 +104,77 @@
1132 * was removed by use of mir_window_spec_set_streams().
1133 */
1134 int mir_surface_get_swapinterval(MirSurface* surface)
1135-__attribute__((deprecated("This will soon be a property of the backing content")));
1136+MIR_FOR_REMOVAL_IN_VERSION_1("This will soon be a property of the backing content");
1137
1138 void mir_surface_spec_set_type(MirSurfaceSpec* spec, MirSurfaceType type)
1139-__attribute__((deprecated("use mir_window_spec_set_type() instead")));
1140+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_type() instead");
1141
1142 void mir_surface_spec_set_name(MirSurfaceSpec* spec, char const* name)
1143-__attribute__((deprecated("use mir_window_spec_set_name() instead")));
1144+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_name() instead");
1145
1146 void mir_surface_spec_set_width(MirSurfaceSpec* spec, unsigned width)
1147-__attribute__((deprecated("use mir_window_spec_set_width() instead")));
1148+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_width() instead");
1149
1150 void mir_surface_spec_set_height(MirSurfaceSpec* spec, unsigned height)
1151-__attribute__((deprecated("use mir_window_spec_set_height() instead")));
1152+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_height() instead");
1153
1154 void mir_surface_spec_set_width_increment(MirSurfaceSpec* spec, unsigned width_inc)
1155-__attribute__((deprecated("use mir_window_spec_set_width_increment() instead")));
1156+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_width_increment() instead");
1157
1158 void mir_surface_spec_set_height_increment(MirSurfaceSpec* spec, unsigned height_inc)
1159-__attribute__((deprecated("use mir_window_spec_set_height_increment() instead")));
1160+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_height_increment() instead");
1161
1162 void mir_surface_spec_set_min_width(MirSurfaceSpec* spec, unsigned min_width)
1163-__attribute__((deprecated("use mir_window_spec_set_min_width() instead")));
1164+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_width() instead");
1165
1166 void mir_surface_spec_set_min_height(MirSurfaceSpec* spec, unsigned min_height)
1167-__attribute__((deprecated("use mir_window_spec_set_min_height() instead")));
1168+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_height() instead");
1169
1170 void mir_surface_spec_set_max_width(MirSurfaceSpec* spec, unsigned max_width)
1171-__attribute__((deprecated("use mir_window_spec_set_max_width() instead")));
1172+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_width() instead");
1173
1174 void mir_surface_spec_set_max_height(MirSurfaceSpec* spec, unsigned max_height)
1175-__attribute__((deprecated("use mir_window_spec_set_max_height() instead")));
1176+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_height() instead");
1177
1178 void mir_surface_spec_set_min_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)
1179-__attribute__((deprecated("use mir_window_spec_set_min_aspect_ratio() instead")));
1180+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_aspect_ratio() instead");
1181
1182 void mir_surface_spec_set_max_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)
1183-__attribute__((deprecated("use mir_window_spec_set_max_aspect_ratio() instead")));
1184+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_aspect_ratio() instead");
1185
1186 void mir_surface_spec_set_fullscreen_on_output(MirSurfaceSpec* spec, uint32_t output_id)
1187-__attribute__((deprecated("use mir_window_spec_set_fullscreen_on_output() instead")));
1188+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_fullscreen_on_output() instead");
1189
1190 void mir_surface_spec_set_preferred_orientation(MirSurfaceSpec* spec, MirOrientationMode mode)
1191-__attribute__((deprecated("use mir_window_spec_set_preferred_orientation() instead")));
1192+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_preferred_orientation() instead");
1193
1194 bool mir_surface_spec_attach_to_foreign_parent(MirSurfaceSpec* spec,
1195 MirPersistentId* parent,
1196 MirRectangle* attachment_rect,
1197 MirEdgeAttachment edge)
1198-__attribute__((deprecated("use mir_window_spec_attach_to_foreign_parent() instead")));
1199+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_attach_to_foreign_parent() instead");
1200
1201 void mir_surface_spec_set_state(MirSurfaceSpec* spec, MirSurfaceState state)
1202-__attribute__((deprecated("use mir_window_spec_set_state() instead")));
1203+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_state() instead");
1204
1205 void mir_surface_spec_release(MirSurfaceSpec* spec)
1206-__attribute__((deprecated("use mir_window_spec_release() instead")));
1207+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_release() instead");
1208
1209 void mir_surface_spec_set_input_shape(MirSurfaceSpec* spec,
1210 MirRectangle const *rectangles,
1211 size_t n_rects)
1212-__attribute__((deprecated("use mir_window_spec_set_input_shape() instead")));
1213+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_input_shape() instead");
1214
1215 void mir_surface_spec_set_event_handler(MirSurfaceSpec* spec,
1216 mir_surface_event_callback callback,
1217 void* context)
1218-__attribute__((deprecated("use mir_window_spec_set_event_handler() instead")));
1219+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_event_handler() instead");
1220
1221 void mir_surface_spec_set_shell_chrome(MirSurfaceSpec* spec, MirShellChrome style)
1222-__attribute__((deprecated("use mir_window_spec_set_shell_chrome() instead")));
1223+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_shell_chrome() instead");
1224
1225 void mir_surface_spec_set_pointer_confinement(MirSurfaceSpec* spec, MirPointerConfinementState state)
1226-__attribute__((deprecated("use mir_window_spec_set_pointer_confinement() instead")));
1227+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_pointer_confinement() instead");
1228
1229 void mir_surface_spec_set_placement(MirSurfaceSpec* spec,
1230 const MirRectangle* rect,
1231@@ -182,69 +183,69 @@
1232 MirPlacementHints placement_hints,
1233 int offset_dx,
1234 int offset_dy)
1235-__attribute__((deprecated("use mir_window_spec_set_placement() instead")));
1236+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_placement() instead");
1237
1238 MirSurfaceSpec* mir_connection_create_spec_for_input_method(MirConnection* connection,
1239 int width, int height,
1240 MirPixelFormat format)
1241-__attribute__((deprecated("use mir_create_input_method_window_spec() instead")));
1242+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_input_method_window_spec() instead");
1243
1244 void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format)
1245-__attribute__((deprecated("use mir_window_spec_set_pixel_format() instead")));
1246+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_pixel_format() instead");
1247
1248 void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage)
1249-__attribute__((deprecated("use mir_window_spec_set_buffer_usage() instead")));
1250+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_buffer_usage() instead");
1251
1252 void mir_surface_spec_set_streams(MirSurfaceSpec* spec,
1253 MirBufferStreamInfo* streams,
1254 unsigned int num_streams)
1255-__attribute__((deprecated("use mir_window_spec_set_streams() instead")));
1256+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_streams() instead");
1257
1258 void mir_surface_apply_spec(MirSurface* surface, MirSurfaceSpec* spec)
1259-__attribute__((deprecated("use mir_window_apply_spec() instead")));
1260+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_apply_spec() instead");
1261
1262 bool mir_surface_is_valid(MirSurface *surface)
1263-__attribute__((deprecated("use mir_window_is_valid() instead")));
1264+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_is_valid() instead");
1265
1266 MirWaitHandle* mir_surface_create(MirSurfaceSpec* requested_specification,
1267 mir_surface_callback callback, void* context)
1268-__attribute__((deprecated("use mir_create_window() instead")));
1269+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_window() instead");
1270
1271 MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification)
1272-__attribute__((deprecated("use mir_create_window_sync() instead")));
1273+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_window_sync() instead");
1274
1275 MirWaitHandle *mir_surface_release(
1276 MirSurface *surface,
1277 mir_surface_callback callback,
1278 void *context)
1279-__attribute__((deprecated("use mir_window_release() instead")));
1280+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_release() instead");
1281
1282 void mir_surface_release_sync(MirSurface *surface)
1283-__attribute__((deprecated("use mir_window_release_sync() instead")));
1284+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_release_sync() instead");
1285
1286 void mir_surface_set_event_handler(MirSurface *surface,
1287 mir_surface_event_callback callback,
1288 void* context)
1289-__attribute__((deprecated("use mir_window_set_event_handler() instead")));
1290+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_event_handler() instead");
1291
1292 MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface)
1293-__attribute__((deprecated("use mir_window_get_buffer_stream() instead")));
1294+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_buffer_stream() instead");
1295
1296 char const* mir_surface_get_error_message(MirSurface *surface)
1297-__attribute__((deprecated("use mir_window_get_error_message() instead")));
1298+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_error_message() instead");
1299
1300 void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters)
1301-__attribute__((deprecated("use mir_window_get_parameters() instead")));
1302+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_parameters() instead");
1303
1304 MirSurfaceType mir_surface_get_type(MirSurface* surface)
1305-__attribute__((deprecated("use mir_window_get_type() instead")));
1306+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_type() instead");
1307
1308 MirWaitHandle* mir_surface_set_state(MirSurface *surface,
1309 MirSurfaceState state)
1310-__attribute__((deprecated("use mir_window_set_state() instead")));
1311+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_state() instead");
1312
1313 MirSurfaceState mir_surface_get_state(MirSurface *surface)
1314-__attribute__((deprecated("use mir_window_get_state() instead")));
1315+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_state() instead");
1316
1317 /**
1318 * Set the swapinterval for the default stream.
1319@@ -260,37 +261,37 @@
1320 * or NULL if the interval could not be supported
1321 */
1322 MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval)
1323-__attribute__((deprecated("Swap interval should be set on the backing content")));
1324+MIR_FOR_REMOVAL_IN_VERSION_1("Swap interval should be set on the backing content");
1325
1326 int mir_surface_get_dpi(MirSurface* surface)
1327-__attribute__((deprecated("use mir_window_get_dpi() instead")));
1328+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_dpi() instead");
1329
1330 MirSurfaceFocusState mir_surface_get_focus(MirSurface *surface)
1331-__attribute__((deprecated("use mir_window_get_focus_state() instead")));
1332+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_focus_state() instead");
1333
1334 MirSurfaceVisibility mir_surface_get_visibility(MirSurface *surface)
1335-__attribute__((deprecated("use mir_window_get_visibility() instead")));
1336+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_visibility() instead");
1337
1338 MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters)
1339-__attribute__((deprecated("use mir_window_configure_cursor() instead")));
1340+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_configure_cursor() instead");
1341
1342 MirOrientation mir_surface_get_orientation(MirSurface *surface)
1343-__attribute__((deprecated("use mir_window_get_orientation() instead")));
1344+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_orientation() instead");
1345
1346 MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation)
1347-__attribute__((deprecated("use mir_window_set_preferred_orientation() instead")));
1348+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_preferred_orientation() instead");
1349
1350 MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surface)
1351-__attribute__((deprecated("use mir_window_get_preferred_orientation() instead")));
1352+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_preferred_orientation() instead");
1353
1354 MirWaitHandle* mir_surface_request_persistent_id(MirSurface* surface, mir_surface_id_callback callback, void* context)
1355-__attribute__((deprecated("use mir_window_request_persistent_id() instead")));
1356+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_request_persistent_id() instead");
1357
1358 MirPersistentId* mir_surface_request_persistent_id_sync(MirSurface *surface)
1359-__attribute__((deprecated("use mir_window_request_persistent_id_sync() instead")));
1360+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_request_persistent_id_sync() instead");
1361
1362 void mir_surface_raise(MirSurface* surface, MirCookie const* cookie)
1363-__attribute__((deprecated("use mir_window_raise() instead")));
1364+MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_raise() instead");
1365
1366 #pragma GCC diagnostic pop
1367
1368
1369=== modified file 'include/client/mir_toolkit/mir_wait.h'
1370--- include/client/mir_toolkit/mir_wait.h 2017-05-08 03:04:26 +0000
1371+++ include/client/mir_toolkit/mir_wait.h 2017-05-18 11:24:43 +0000
1372@@ -19,6 +19,7 @@
1373 #define MIR_TOOLKIT_MIR_WAIT_H_
1374
1375 #include <mir_toolkit/client_types.h>
1376+#include <mir_toolkit/deprecations.h>
1377
1378 #ifdef __cplusplus
1379 /**
1380@@ -36,7 +37,7 @@
1381 * \param [in] wait_handle Handle returned by an asynchronous request
1382 */
1383 void mir_wait_for(MirWaitHandle *wait_handle)
1384-__attribute__ ((deprecated("No longer supported - use callbacks or wait for state changes")));
1385+MIR_FOR_REMOVAL_IN_VERSION_1("No longer supported - use callbacks or wait for state changes");
1386
1387 /**
1388 * Wait on the supplied handle until one instance of the associated request
1389@@ -47,7 +48,7 @@
1390 * \param [in] wait_handle Handle returned by an asynchronous request
1391 */
1392 void mir_wait_for_one(MirWaitHandle *wait_handle)
1393-__attribute__ ((deprecated("No longer supported - use callbacks or wait for state changes")));
1394+MIR_FOR_REMOVAL_IN_VERSION_1("No longer supported - use callbacks or wait for state changes");
1395
1396
1397 #ifdef __cplusplus
1398
1399=== modified file 'include/client/mir_toolkit/mir_window.h'
1400--- include/client/mir_toolkit/mir_window.h 2017-05-08 03:04:26 +0000
1401+++ include/client/mir_toolkit/mir_window.h 2017-05-18 11:24:43 +0000
1402@@ -22,6 +22,7 @@
1403 #include <mir_toolkit/client_types.h>
1404 #include <mir_toolkit/common.h>
1405 #include <mir_toolkit/mir_cursor_configuration.h>
1406+#include <mir_toolkit/deprecations.h>
1407
1408 #include <stdbool.h>
1409
1410@@ -543,7 +544,7 @@
1411 * the point mir_create_window() is called it will instead return an invalid window.
1412 */
1413 void mir_window_spec_set_pixel_format(MirWindowSpec* spec, MirPixelFormat format)
1414- __attribute__((deprecated("Use mir_connection_allocate_buffer/mir_render_surface_get_buffer_stream instead")));
1415+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_connection_allocate_buffer/mir_render_surface_get_buffer_stream instead");
1416
1417 /**
1418 * \note To be deprecated soon. Only for enabling other deprecations.
1419@@ -560,7 +561,7 @@
1420 #pragma GCC diagnostic push
1421 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1422 void mir_window_spec_set_buffer_usage(MirWindowSpec* spec, MirBufferUsage usage)
1423- __attribute__((deprecated("No longer applicable, use mir_render_surface apis")));
1424+MIR_FOR_REMOVAL_IN_VERSION_1("No longer applicable, use mir_render_surface apis");
1425 #pragma GCC diagnostic pop
1426 /**
1427 *
1428@@ -585,32 +586,7 @@
1429 void mir_window_spec_set_streams(MirWindowSpec* spec,
1430 MirBufferStreamInfo* streams,
1431 unsigned int num_streams)
1432- __attribute__((deprecated("Use mir_window_spec_add_render_surface instead")));
1433-
1434-/**
1435- * Set the MirWindowSpec to display content contained in a render surface
1436- *
1437- * \warning: The initial call to mir_window_spec_add_render_surface will set
1438- * the bottom-most content, and subsequent calls will stack the
1439- * content on top.
1440- *
1441- * \param spec The window_spec to be updated
1442- * \param render_surface The render surface containing the content to be displayed
1443- * \param logical_width The width that the content will be displayed at
1444- * (Ignored for buffer streams)
1445- * \param logical_height The height that the content will be displayed at
1446- * (Ignored for buffer streams)
1447- * \param displacement_x The x displacement from the top-left corner of the MirWindow
1448- * \param displacement_y The y displacement from the top-left corner of the MirWindow
1449- */
1450-#pragma GCC diagnostic push
1451-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1452-void mir_window_spec_add_render_surface(MirWindowSpec* spec,
1453- MirRenderSurface* render_surface,
1454- int logical_width, int logical_height,
1455- int displacement_x, int displacement_y)
1456-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1457-#pragma GCC diagnostic pop
1458+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_add_render_surface instead");
1459
1460 /**
1461 * Release the resources held by a MirWindowSpec.
1462@@ -710,7 +686,7 @@
1463 * \param[in] window The window
1464 */
1465 MirBufferStream* mir_window_get_buffer_stream(MirWindow* window)
1466- __attribute__((deprecated("Use mir_window_spec_add_render_surface during window creation/modification instead")));
1467+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_add_render_surface during window creation/modification instead");
1468 /**
1469 * Retrieve a text description of the error. The returned string is owned by
1470 * the library and remains valid until the window or the associated
1471@@ -732,7 +708,7 @@
1472 #pragma GCC diagnostic push
1473 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1474 void mir_window_get_parameters(MirWindow* window, MirWindowParameters* parameters)
1475- __attribute__((deprecated("Use mir_window_get_xxx apis or listen to state/attribute change events instead")));
1476+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_get_xxx apis or listen to state/attribute change events instead");
1477 #pragma GCC diagnostic pop
1478
1479
1480@@ -816,7 +792,7 @@
1481 #pragma GCC diagnostic push
1482 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1483 void mir_window_configure_cursor(MirWindow* window, MirCursorConfiguration const* parameters)
1484- __attribute__((deprecated("Use mir_window_spec_set_cursor_name/mir_window_spec_set_cursor_render_surface instead")));
1485+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_name/mir_window_spec_set_cursor_render_surface instead");
1486 #pragma GCC diagnostic pop
1487 /**
1488 * Request to set the preferred orientations of a window.
1489@@ -847,7 +823,7 @@
1490 * \param [in,out] context User data passed to completion callback.
1491 */
1492 void mir_window_request_persistent_id(MirWindow* window, MirWindowIdCallback callback, void* context)
1493-__attribute__((deprecated("Use mir_window_request_window_id() instead")));
1494+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_request_window_id() instead");
1495 void mir_window_request_window_id(MirWindow* window, MirWindowIdCallback callback, void* context);
1496
1497 /**
1498@@ -857,7 +833,7 @@
1499 * be freed with a call to mir_persistent_id_release()
1500 */
1501 MirPersistentId* mir_window_request_persistent_id_sync(MirWindow* window)
1502-__attribute__((deprecated("Use mir_window_request_window_id_sync")));
1503+MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_request_window_id_sync");
1504 MirWindowId* mir_window_request_window_id_sync(MirWindow* window);
1505 #ifdef __cplusplus
1506 }
1507
1508=== modified file 'include/client/mir_toolkit/rs/mir_render_surface.h'
1509--- include/client/mir_toolkit/rs/mir_render_surface.h 2017-05-08 03:04:26 +0000
1510+++ include/client/mir_toolkit/rs/mir_render_surface.h 2017-05-18 11:24:43 +0000
1511@@ -21,6 +21,18 @@
1512 #define MIR_TOOLKIT_MIR_RENDER_SURFACE_H_
1513
1514 #include <mir_toolkit/client_types.h>
1515+#include <mir_toolkit/deprecations.h>
1516+
1517+#ifndef MIR_DEPRECATE_RENDERSURFACES
1518+ #define MIR_DEPRECATE_RENDERSURFACES 1
1519+#endif
1520+
1521+#if MIR_ENABLE_DEPRECATIONS > 0 && MIR_DEPRECATE_RENDERSURFACES > 0
1522+ #define MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1\
1523+ __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")))
1524+#else
1525+ #define MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1
1526+#endif
1527
1528 #ifdef __cplusplus
1529 /**
1530@@ -30,6 +42,9 @@
1531 extern "C" {
1532 #endif
1533
1534+typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context)
1535+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1536+
1537 #pragma GCC diagnostic push
1538 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1539 /**
1540@@ -49,7 +64,7 @@
1541 int width, int height,
1542 MirRenderSurfaceCallback callback,
1543 void* context)
1544-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1545+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1546
1547 /**
1548 * Create a render surface and wait for the result
1549@@ -64,7 +79,7 @@
1550 MirRenderSurface* mir_connection_create_render_surface_sync(
1551 MirConnection* connection,
1552 int width, int height)
1553-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1554+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1555
1556 /**
1557 * Get the size of the MirRenderSurface
1558@@ -76,7 +91,7 @@
1559 void mir_render_surface_get_size(
1560 MirRenderSurface* render_surface,
1561 int* width, int* height)
1562-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1563+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1564
1565 /**
1566 * Set the size of the MirRenderSurface
1567@@ -88,7 +103,7 @@
1568 void mir_render_surface_set_size(
1569 MirRenderSurface* render_surface,
1570 int width, int height)
1571-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1572+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1573
1574 /**
1575 * Test for a valid render surface
1576@@ -100,7 +115,7 @@
1577 */
1578 bool mir_render_surface_is_valid(
1579 MirRenderSurface* render_surface)
1580-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1581+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1582
1583 /**
1584 * Retrieve a text description of the error. The returned string is owned by
1585@@ -113,7 +128,7 @@
1586 */
1587 char const *mir_render_surface_get_error_message(
1588 MirRenderSurface* render_surface)
1589-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1590+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1591
1592 /**
1593 * Release the specified render surface
1594@@ -122,7 +137,7 @@
1595 */
1596 void mir_render_surface_release(
1597 MirRenderSurface* render_surface)
1598-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1599+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1600
1601 /**
1602 * Obtain the buffer stream backing a given render surface.
1603@@ -142,7 +157,7 @@
1604 MirRenderSurface* render_surface,
1605 int width, int height,
1606 MirPixelFormat format)
1607-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1608+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1609
1610 /**
1611 * Obtain the presentation chain backing a given render surface.
1612@@ -155,7 +170,7 @@
1613 */
1614 MirPresentationChain* mir_render_surface_get_presentation_chain(
1615 MirRenderSurface* render_surface)
1616-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1617+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1618
1619 /** Query whether the server supports a given presentation mode.
1620 *
1621@@ -189,7 +204,7 @@
1622 MirWindowSpec* spec,
1623 MirRenderSurface* render_surface,
1624 int hotspot_x, int hotspot_y)
1625-__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));
1626+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1627
1628 /**
1629 * Returns a new cursor configuration tied to a given render surface.
1630@@ -204,7 +219,30 @@
1631 MirCursorConfiguration* mir_cursor_configuration_from_render_surface(
1632 MirRenderSurface* surface,
1633 int hotspot_x, int hotspot_y)
1634-__attribute__((deprecated("Use mir_window_spec_set_cursor_render_surface instead")));
1635+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1636+
1637+
1638+/**
1639+ * Set the MirWindowSpec to display content contained in a render surface
1640+ *
1641+ * \warning: The initial call to mir_window_spec_add_render_surface will set
1642+ * the bottom-most content, and subsequent calls will stack the
1643+ * content on top.
1644+ *
1645+ * \param spec The window_spec to be updated
1646+ * \param render_surface The render surface containing the content to be displayed
1647+ * \param logical_width The width that the content will be displayed at
1648+ * (Ignored for buffer streams)
1649+ * \param logical_height The height that the content will be displayed at
1650+ * (Ignored for buffer streams)
1651+ * \param displacement_x The x displacement from the top-left corner of the MirWindow
1652+ * \param displacement_y The y displacement from the top-left corner of the MirWindow
1653+ */
1654+void mir_window_spec_add_render_surface(MirWindowSpec* spec,
1655+ MirRenderSurface* render_surface,
1656+ int logical_width, int logical_height,
1657+ int displacement_x, int displacement_y)
1658+MIR_RENDERSURFACES_FOR_RENAME_IN_VERSION_1;
1659
1660 #pragma GCC diagnostic pop
1661
1662
1663=== modified file 'include/core/mir_toolkit/common.h'
1664--- include/core/mir_toolkit/common.h 2017-05-08 03:04:26 +0000
1665+++ include/core/mir_toolkit/common.h 2017-05-18 11:24:43 +0000
1666@@ -21,6 +21,8 @@
1667 #ifndef MIR_COMMON_H_
1668 #define MIR_COMMON_H_
1669
1670+#include <mir_toolkit/deprecations.h>
1671+
1672 //for clang
1673 #ifndef __has_feature
1674 #define __has_feature(x) 0 // Compatibility with non-clang
1675@@ -35,7 +37,7 @@
1676 (__has_extension(attribute_deprecated_with_message) && \
1677 __has_extension(enumerator_attributes))
1678 #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \
1679- ENUM __attribute__ ((deprecated("Use " #INSTEAD " instead")))
1680+ ENUM MIR_FOR_REMOVAL_IN_VERSION_1("Use " #INSTEAD " instead")
1681 #else
1682 #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \
1683 ENUM
1684@@ -65,7 +67,7 @@
1685 mir_surface_attrib_preferred_orientation,
1686 /* Must be last */
1687 mir_surface_attribs
1688-} MirSurfaceAttrib __attribute__ ((deprecated("use MirWindowAttrib")));
1689+} MirSurfaceAttrib MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowAttrib");
1690
1691 /**
1692 * Attributes of a window that the client and server/shell may wish to
1693@@ -102,7 +104,7 @@
1694 mir_surface_type_satellite, /**< AKA "toolbox"/"toolbar" */
1695 mir_surface_type_tip, /**< AKA "tooltip" */
1696 mir_surface_types
1697-} MirSurfaceType __attribute__ ((deprecated("use MirWindowType")));
1698+} MirSurfaceType MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowType");
1699
1700 typedef enum MirWindowType
1701 {
1702@@ -132,7 +134,7 @@
1703 mir_surface_state_horizmaximized,
1704 mir_surface_state_hidden,
1705 mir_surface_states
1706-} MirSurfaceState __attribute__ ((deprecated("use MirWindowState")));
1707+} MirSurfaceState MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowState");
1708
1709 typedef enum MirWindowState
1710 {
1711@@ -154,7 +156,7 @@
1712 {
1713 mir_surface_unfocused = 0,
1714 mir_surface_focused
1715-} MirSurfaceFocusState __attribute__ ((deprecated("use MirWindowFocusState")));
1716+} MirSurfaceFocusState MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowFocusState");
1717
1718 typedef enum MirWindowFocusState
1719 {
1720@@ -166,7 +168,7 @@
1721 {
1722 mir_surface_visibility_occluded = 0,
1723 mir_surface_visibility_exposed
1724-} MirSurfaceVisibility __attribute__ ((deprecated("use MirWindowFocusState")));
1725+} MirSurfaceVisibility MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowFocusState");
1726
1727 typedef enum MirWindowVisibility
1728 {
1729
1730=== added file 'include/core/mir_toolkit/deprecations.h'
1731--- include/core/mir_toolkit/deprecations.h 1970-01-01 00:00:00 +0000
1732+++ include/core/mir_toolkit/deprecations.h 2017-05-18 11:24:43 +0000
1733@@ -0,0 +1,36 @@
1734+/*
1735+ * Copyright © 2017 Canonical Ltd.
1736+ *
1737+ * This program is free software: you can redistribute it and/or modify it
1738+ * under the terms of the GNU Lesser General Public License version 3,
1739+ * as published by the Free Software Foundation.
1740+ *
1741+ * This program is distributed in the hope that it will be useful,
1742+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1743+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1744+ * GNU Lesser General Public License for more details.
1745+ *
1746+ * You should have received a copy of the GNU Lesser General Public License
1747+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1748+ */
1749+
1750+#ifndef MIR_DEPRECATIONS_H_
1751+#define MIR_DEPRECATIONS_H_
1752+
1753+#ifndef MIR_ENABLE_DEPRECATIONS
1754+ // use __GNUC__ < 6 as a proxy for building on Ubunutu 16.04LTS ("Xenial")
1755+ #if defined(__clang__) || !defined(__GNUC__) || (__GNUC__ >= 6)
1756+ #define MIR_ENABLE_DEPRECATIONS 1
1757+ #else
1758+ #define MIR_ENABLE_DEPRECATIONS 0
1759+ #endif
1760+#endif
1761+
1762+#if MIR_ENABLE_DEPRECATIONS > 0
1763+ #define MIR_FOR_REMOVAL_IN_VERSION_1(message)\
1764+ __attribute__((deprecated(message)))
1765+#else
1766+ #define MIR_FOR_REMOVAL_IN_VERSION_1(message)
1767+#endif
1768+
1769+#endif //MIR_DEPRECATIONS_H_
1770
1771=== modified file 'include/server/mir/shell/basic_window_manager.h'
1772--- include/server/mir/shell/basic_window_manager.h 2017-05-08 03:04:26 +0000
1773+++ include/server/mir/shell/basic_window_manager.h 2017-05-18 11:24:43 +0000
1774@@ -230,7 +230,7 @@
1775 void update_event_timestamp(MirPointerEvent const* pev);
1776 void update_event_timestamp(MirTouchEvent const* tev);
1777 void update_event_timestamp(MirInputEvent const* iev);
1778-} __attribute__((deprecated("Use libmiral instead")));
1779+} MIR_FOR_REMOVAL_IN_VERSION_1("Use libmiral instead");
1780
1781 #pragma GCC diagnostic push
1782 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1783@@ -260,7 +260,7 @@
1784 return std::unique_ptr<WMPolicy>(
1785 new WMPolicy(this, std::forward<PolicyArgs>(policy_args)...));
1786 }
1787-} __attribute__((deprecated("Use libmiral instead")));
1788+} MIR_FOR_REMOVAL_IN_VERSION_1("Use libmiral instead");
1789 #pragma GCC diagnostic pop
1790 }
1791 }
1792
1793=== modified file 'src/common/events/input_configuration_event.cpp'
1794--- src/common/events/input_configuration_event.cpp 2017-05-08 03:04:26 +0000
1795+++ src/common/events/input_configuration_event.cpp 2017-05-18 11:24:43 +0000
1796@@ -18,13 +18,12 @@
1797
1798 #include "mir/events/input_configuration_event.h"
1799
1800+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1801 MirInputConfigurationEvent::MirInputConfigurationEvent()
1802 {
1803 event.initInputConfiguration();
1804 }
1805
1806-#pragma GCC diagnostic push
1807-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1808 MirInputConfigurationAction MirInputConfigurationEvent::action() const
1809 {
1810 return static_cast<MirInputConfigurationAction>(event.asReader().getInputConfiguration().getAction());
1811@@ -34,7 +33,6 @@
1812 {
1813 event.getInputConfiguration().setAction(static_cast<mir::capnp::InputConfigurationEvent::Action>(action));
1814 }
1815-#pragma GCC diagnostic pop
1816
1817 std::chrono::nanoseconds MirInputConfigurationEvent::when() const
1818 {
1819
1820=== modified file 'src/include/common/mir/events/input_configuration_event.h'
1821--- src/include/common/mir/events/input_configuration_event.h 2017-05-08 03:04:26 +0000
1822+++ src/include/common/mir/events/input_configuration_event.h 2017-05-18 11:24:43 +0000
1823@@ -37,8 +37,7 @@
1824
1825 MirInputDeviceId id() const;
1826 void set_id(MirInputDeviceId id);
1827-}
1828- __attribute__((deprecated));
1829+};
1830 #pragma GCC diagnostic pop
1831
1832 #endif /* MIR_COMMON_INPUT_CONFIGURATION_EVENT_H_ */

Subscribers

People subscribed via source and target branches