Mir

Merge lp:~mir-team/mir/zesty-0.26 into lp:mir/zesty

Proposed by Michał Sawicz
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 1302
Proposed branch: lp:~mir-team/mir/zesty-0.26
Merge into: lp:mir/zesty
Diff against target: 2049 lines (+423/-227)
37 files modified
CMakeLists.txt (+1/-1)
debian/changelog (+20/-0)
include/client/mir/event_printer.h (+5/-5)
include/client/mir/events/event_builders.h (+10/-10)
include/client/mir_toolkit/client_types.h (+22/-25)
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 (+3/-1)
include/client/mir_toolkit/mir_connection.h (+9/-8)
include/client/mir_toolkit/mir_cursor_configuration.h (+2/-1)
include/client/mir_toolkit/mir_display_configuration.h (+3/-2)
include/client/mir_toolkit/mir_persistent_id.h (+5/-4)
include/client/mir_toolkit/mir_platform_message.h (+8/-7)
include/client/mir_toolkit/mir_screencast.h (+2/-1)
include/client/mir_toolkit/mir_surface.h (+61/-60)
include/client/mir_toolkit/mir_wait.h (+3/-2)
include/client/mir_toolkit/mir_window.h (+4/-3)
include/client/mir_toolkit/rs/mir_render_surface.h (+47/-11)
include/core/mir_toolkit/common.h (+8/-6)
include/core/mir_toolkit/deprecations.h (+36/-0)
src/common/events/input_configuration_event.cpp (+1/-3)
src/include/common/mir/events/input_configuration_event.h (+1/-2)
src/platforms/android/utils/CMakeLists.txt (+1/-0)
src/platforms/mesa/server/kms/kms_page_flipper.cpp (+6/-6)
src/server/input/default_configuration.cpp (+6/-2)
src/server/input/default_device.cpp (+56/-25)
src/server/input/default_device.h (+4/-1)
src/server/input/default_input_device_hub.cpp (+15/-9)
src/server/input/default_input_device_hub.h (+5/-4)
tests/unit-tests/input/test_default_device.cpp (+23/-0)
tests/unit-tests/input/test_default_input_device_hub.cpp (+18/-0)
To merge this branch: bzr merge lp:~mir-team/mir/zesty-0.26
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
Review via email: mp+325068@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

LGTMa

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2017-02-17 02:24:03 +0000
+++ CMakeLists.txt 2017-06-05 10:39:04 +0000
@@ -29,7 +29,7 @@
2929
30set(MIR_VERSION_MAJOR 0)30set(MIR_VERSION_MAJOR 0)
31set(MIR_VERSION_MINOR 26)31set(MIR_VERSION_MINOR 26)
32set(MIR_VERSION_PATCH 2)32set(MIR_VERSION_PATCH 3)
3333
34add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR})34add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR})
35add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR})35add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR})
3636
=== modified file 'debian/changelog'
--- debian/changelog 2017-04-12 21:43:04 +0000
+++ debian/changelog 2017-06-05 10:39:04 +0000
@@ -1,3 +1,23 @@
1mir (0.26.3) UNRELEASED; urgency=medium
2
3 [ Daniel van Vugt ]
4 * New upstream release 0.26.3 (https://launchpad.net/mir/+milestone/0.26.3)
5 - Enhancements:
6 . Make deprecations optional (and default to off for builds on 16.04 LTS)
7 . Added support for building on Ubuntu 17.10 artful.
8 - Bugs fixed:
9 . Mir needs to be updated to 0.26 in 16.04LTS (LP: #1685186)
10 . unity-system-compositor crashed with SIGSEGV in
11 libinput_device_config_accel_is_available() from
12 libinput_device_config_accel_set_speed() from
13 mir::input::evdev::LibInputDevice::apply_settings() (LP: #1672955)
14 . Please transition to Boost 1.62 (LP: #1675138)
15 . Mir sending key repeat events continually to nested shell after VT
16 switch (causes Unity8 lockup for a while) (LP: #1675357)
17 . mir_demo_standalone_render_overlays fails to link (LP: #1677239)
18
19 -- Alan Griffiths <alan.griffiths@canonical.com> Fri, 26 May 2017 16:57:20 +0000
20
1mir (0.26.2+17.04.20170322.1-0ubuntu2) zesty; urgency=medium21mir (0.26.2+17.04.20170322.1-0ubuntu2) zesty; urgency=medium
222
3 [ Mattia Rizzolo ]23 [ Mattia Rizzolo ]
424
=== modified file 'include/client/mir/event_printer.h'
--- include/client/mir/event_printer.h 2017-01-19 05:30:03 +0000
+++ include/client/mir/event_printer.h 2017-06-05 10:39:04 +0000
@@ -35,19 +35,19 @@
35std::ostream& operator<<(std::ostream& out, MirOrientation orientation);35std::ostream& operator<<(std::ostream& out, MirOrientation orientation);
3636
37std::ostream& operator<<(std::ostream& out, MirSurfaceAttrib attribute)37std::ostream& operator<<(std::ostream& out, MirSurfaceAttrib attribute)
38__attribute__ ((deprecated("use << with MirWindowAttrib instead")));38MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowAttrib instead");
39std::ostream& operator<<(std::ostream& out, MirWindowAttrib attribute);39std::ostream& operator<<(std::ostream& out, MirWindowAttrib attribute);
40std::ostream& operator<<(std::ostream& out, MirSurfaceFocusState state)40std::ostream& operator<<(std::ostream& out, MirSurfaceFocusState state)
41__attribute__ ((deprecated("use << with MirWindowFocusState instead")));41MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowFocusState instead");
42std::ostream& operator<<(std::ostream& out, MirWindowFocusState state);42std::ostream& operator<<(std::ostream& out, MirWindowFocusState state);
43std::ostream& operator<<(std::ostream& out, MirSurfaceVisibility state)43std::ostream& operator<<(std::ostream& out, MirSurfaceVisibility state)
44__attribute__ ((deprecated("use << with MirWindowVisibility instead")));44MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowVisibility instead");
45std::ostream& operator<<(std::ostream& out, MirWindowVisibility state);45std::ostream& operator<<(std::ostream& out, MirWindowVisibility state);
46std::ostream& operator<<(std::ostream& out, MirSurfaceType type)46std::ostream& operator<<(std::ostream& out, MirSurfaceType type)
47__attribute__ ((deprecated("use << with MirWindowType instead")));47MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowType instead");
48std::ostream& operator<<(std::ostream& out, MirWindowType type);48std::ostream& operator<<(std::ostream& out, MirWindowType type);
49std::ostream& operator<<(std::ostream& out, MirSurfaceState state)49std::ostream& operator<<(std::ostream& out, MirSurfaceState state)
50__attribute__ ((deprecated("use << with MirWindowState instead")));50MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowState instead");
51std::ostream& operator<<(std::ostream& out, MirWindowState state);51std::ostream& operator<<(std::ostream& out, MirWindowState state);
5252
53std::ostream& operator<<(std::ostream& out, MirPromptSessionEvent const& event);53std::ostream& operator<<(std::ostream& out, MirPromptSessionEvent const& event);
5454
=== modified file 'include/client/mir/events/event_builders.h'
--- include/client/mir/events/event_builders.h 2017-01-19 05:30:03 +0000
+++ include/client/mir/events/event_builders.h 2017-06-05 10:39:04 +0000
@@ -48,7 +48,7 @@
48EventUPtr make_event(frontend::SurfaceId const& surface_id, geometry::Size const& size);48EventUPtr make_event(frontend::SurfaceId const& surface_id, geometry::Size const& size);
49// Surface configure event49// Surface configure event
50EventUPtr make_event(frontend::SurfaceId const& surface_id, MirSurfaceAttrib attribute, int value)50EventUPtr make_event(frontend::SurfaceId const& surface_id, MirSurfaceAttrib attribute, int value)
51__attribute__ ((deprecated("use make_event with MirWindowAttribute instead")));51MIR_FOR_REMOVAL_IN_VERSION_1("use make_event with MirWindowAttribute instead");
52// Window configure event52// Window configure event
53EventUPtr make_event(frontend::SurfaceId const& surface_id, MirWindowAttrib attribute, int value);53EventUPtr make_event(frontend::SurfaceId const& surface_id, MirWindowAttrib attribute, int value);
54// Close surface event54// Close surface event
@@ -81,12 +81,12 @@
81// Deprecated version with uint64_t mac81// Deprecated version with uint64_t mac
82EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,82EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
83 uint64_t mac, MirKeyboardAction action, xkb_keysym_t key_code,83 uint64_t mac, MirKeyboardAction action, xkb_keysym_t key_code,
84 int scan_code, MirInputEventModifiers modifiers) __attribute__ ((deprecated));84 int scan_code, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
8585
86// Deprecated version without mac86// Deprecated version without mac
87EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,87EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
88 MirKeyboardAction action, xkb_keysym_t key_code,88 MirKeyboardAction action, xkb_keysym_t key_code,
89 int scan_code, MirInputEventModifiers modifiers) __attribute__ ((deprecated));89 int scan_code, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
9090
91// Touch event91// Touch event
92EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,92EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
@@ -94,11 +94,11 @@
9494
95// Deprecated version with uint64_t mac95// Deprecated version with uint64_t mac
96EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,96EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
97 uint64_t mac, MirInputEventModifiers modifiers) __attribute__ ((deprecated));97 uint64_t mac, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
9898
99// Deprecated version without mac99// Deprecated version without mac
100EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,100EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
101 MirInputEventModifiers modifiers) __attribute__ ((deprecated));101 MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
102102
103void add_touch(MirEvent &event, MirTouchId touch_id, MirTouchAction action,103void add_touch(MirEvent &event, MirTouchId touch_id, MirTouchAction action,
104 MirTouchTooltype tooltype, float x_axis_value, float y_axis_value,104 MirTouchTooltype tooltype, float x_axis_value, float y_axis_value,
@@ -110,14 +110,14 @@
110 uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action,110 uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action,
111 MirPointerButtons buttons_pressed,111 MirPointerButtons buttons_pressed,
112 float x_axis_value, float y_axis_value,112 float x_axis_value, float y_axis_value,
113 float hscroll_value, float vscroll_value) __attribute__ ((deprecated));113 float hscroll_value, float vscroll_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
114114
115// Deprecated version without relative axis and mac115// Deprecated version without relative axis and mac
116EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,116EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
117 MirInputEventModifiers modifiers, MirPointerAction action,117 MirInputEventModifiers modifiers, MirPointerAction action,
118 MirPointerButtons buttons_pressed,118 MirPointerButtons buttons_pressed,
119 float x_axis_value, float y_axis_value,119 float x_axis_value, float y_axis_value,
120 float hscroll_value, float vscroll_value) __attribute__ ((deprecated));120 float hscroll_value, float vscroll_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
121121
122EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,122EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
123 std::vector<uint8_t> const& mac, MirInputEventModifiers modifiers, MirPointerAction action,123 std::vector<uint8_t> const& mac, MirInputEventModifiers modifiers, MirPointerAction action,
@@ -132,7 +132,7 @@
132 MirPointerButtons buttons_pressed,132 MirPointerButtons buttons_pressed,
133 float x_axis_value, float y_axis_value,133 float x_axis_value, float y_axis_value,
134 float hscroll_value, float vscroll_value,134 float hscroll_value, float vscroll_value,
135 float relative_x_value, float relative_y_value) __attribute__ ((deprecated));135 float relative_x_value, float relative_y_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
136136
137// Deprecated version without mac137// Deprecated version without mac
138EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,138EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
@@ -140,11 +140,11 @@
140 MirPointerButtons buttons_pressed,140 MirPointerButtons buttons_pressed,
141 float x_axis_value, float y_axis_value,141 float x_axis_value, float y_axis_value,
142 float hscroll_value, float vscroll_value,142 float hscroll_value, float vscroll_value,
143 float relative_x_value, float relative_y_value) __attribute__ ((deprecated));143 float relative_x_value, float relative_y_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
144144
145// Input configuration event145// Input configuration event
146EventUPtr make_event(MirInputConfigurationAction action,146EventUPtr make_event(MirInputConfigurationAction action,
147 MirInputDeviceId id, std::chrono::nanoseconds time) __attribute__((deprecated));147 MirInputDeviceId id, std::chrono::nanoseconds time) MIR_FOR_REMOVAL_IN_VERSION_1("unused");
148148
149EventUPtr make_event(std::chrono::nanoseconds timestamp,149EventUPtr make_event(std::chrono::nanoseconds timestamp,
150 MirPointerButtons pointer_buttons,150 MirPointerButtons pointer_buttons,
151151
=== modified file 'include/client/mir_toolkit/client_types.h'
--- include/client/mir_toolkit/client_types.h 2017-03-16 16:47:21 +0000
+++ include/client/mir_toolkit/client_types.h 2017-06-05 10:39:04 +0000
@@ -23,6 +23,7 @@
2323
24#include <mir_toolkit/events/event.h>24#include <mir_toolkit/events/event.h>
25#include <mir_toolkit/common.h>25#include <mir_toolkit/common.h>
26#include <mir_toolkit/deprecations.h>
2627
27#include <stddef.h>28#include <stddef.h>
2829
@@ -38,23 +39,22 @@
38typedef void* MirEGLNativeWindowType;39typedef void* MirEGLNativeWindowType;
39typedef void* MirEGLNativeDisplayType;40typedef void* MirEGLNativeDisplayType;
40typedef struct MirConnection MirConnection;41typedef struct MirConnection MirConnection;
41typedef struct MirSurface MirSurface __attribute__((deprecated("Use MirWindow instead")));42typedef struct MirSurface MirSurface MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindow instead");
42typedef struct MirSurface MirWindow;43typedef struct MirSurface MirWindow;
43typedef struct MirSurfaceSpec MirSurfaceSpec __attribute__((deprecated("Use MirWindowSpec instead")));44typedef struct MirSurfaceSpec MirSurfaceSpec MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowSpec instead");
44typedef struct MirSurfaceSpec MirWindowSpec;45typedef struct MirSurfaceSpec MirWindowSpec;
45typedef struct MirScreencast MirScreencast;46typedef struct MirScreencast MirScreencast;
46typedef struct MirScreencastSpec MirScreencastSpec;47typedef struct MirScreencastSpec MirScreencastSpec;
47typedef struct MirPromptSession MirPromptSession;48typedef struct MirPromptSession MirPromptSession;
48typedef struct MirBufferStream MirBufferStream;49typedef struct MirBufferStream MirBufferStream;
49typedef struct MirPersistentId MirPersistentId __attribute((deprecated("Use MirWindowId instead")));50typedef struct MirPersistentId MirPersistentId MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowId instead");
50typedef struct MirPersistentId MirWindowId;51typedef struct MirPersistentId MirWindowId;
51typedef struct MirBlob MirBlob;52typedef struct MirBlob MirBlob;
52typedef struct MirDisplayConfig MirDisplayConfig;53typedef struct MirDisplayConfig MirDisplayConfig;
53typedef struct MirError MirError;54typedef struct MirError MirError;
54typedef struct MirPresentationChain MirPresentationChain;55typedef struct MirPresentationChain MirPresentationChain;
55typedef struct MirBuffer MirBuffer;56typedef struct MirBuffer MirBuffer;
56typedef struct MirRenderSurface MirRenderSurface57typedef struct MirRenderSurface MirRenderSurface;
57__attribute__((deprecated("This type is slated for rename due to MirRenderSurface-->MirSurface transition")));
5858
59/**59/**
60 * Descriptor for an output connection.60 * Descriptor for an output connection.
@@ -82,7 +82,7 @@
82typedef void (*MirConnectedCallback)(82typedef void (*MirConnectedCallback)(
83 MirConnection *connection, void *client_context);83 MirConnection *connection, void *client_context);
84typedef MirConnectedCallback mir_connected_callback84typedef MirConnectedCallback mir_connected_callback
85 __attribute__((deprecated("Use MirConnectedCallback instead")));85 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirConnectedCallback instead");
8686
87/**87/**
88 * Callback to be passed when calling window functions :88 * Callback to be passed when calling window functions :
@@ -102,7 +102,7 @@
102typedef void (*MirBufferStreamCallback)(102typedef void (*MirBufferStreamCallback)(
103 MirBufferStream *stream, void *client_context);103 MirBufferStream *stream, void *client_context);
104typedef MirBufferStreamCallback mir_buffer_stream_callback104typedef MirBufferStreamCallback mir_buffer_stream_callback
105 __attribute__((deprecated("Use MirBufferStreamCallback instead")));105 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirBufferStreamCallback instead");
106106
107/**107/**
108 * Callback for handling of window events.108 * Callback for handling of window events.
@@ -124,7 +124,7 @@
124typedef void (*MirLifecycleEventCallback)(124typedef void (*MirLifecycleEventCallback)(
125 MirConnection* connection, MirLifecycleState state, void* context);125 MirConnection* connection, MirLifecycleState state, void* context);
126typedef MirLifecycleEventCallback mir_lifecycle_event_callback126typedef MirLifecycleEventCallback mir_lifecycle_event_callback
127 __attribute__((deprecated("Use MirLifecycleEventCallback instead")));127 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirLifecycleEventCallback instead");
128128
129/**129/**
130 * Callback called when the server pings for responsiveness testing.130 * Callback called when the server pings for responsiveness testing.
@@ -136,7 +136,7 @@
136typedef void (*MirPingEventCallback)(136typedef void (*MirPingEventCallback)(
137 MirConnection* connection, int32_t serial, void* context);137 MirConnection* connection, int32_t serial, void* context);
138typedef MirPingEventCallback mir_ping_event_callback138typedef MirPingEventCallback mir_ping_event_callback
139 __attribute__((deprecated("Use MirPingEventCallback instead")));139 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPingEventCallback instead");
140140
141/**141/**
142 * Callback called when a display config change has occurred142 * Callback called when a display config change has occurred
@@ -147,7 +147,7 @@
147typedef void (*MirDisplayConfigCallback)(147typedef void (*MirDisplayConfigCallback)(
148 MirConnection* connection, void* context);148 MirConnection* connection, void* context);
149typedef MirDisplayConfigCallback mir_display_config_callback149typedef MirDisplayConfigCallback mir_display_config_callback
150 __attribute__((deprecated("Use MirDisplayConfigCallback instead")));150 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirDisplayConfigCallback instead");
151151
152/**152/**
153 * Callback called when a request for client file descriptors completes153 * Callback called when a request for client file descriptors completes
@@ -162,7 +162,7 @@
162typedef void (*MirClientFdCallback)(162typedef void (*MirClientFdCallback)(
163 MirPromptSession *prompt_session, size_t count, int const* fds, void* context);163 MirPromptSession *prompt_session, size_t count, int const* fds, void* context);
164typedef MirClientFdCallback mir_client_fd_callback164typedef MirClientFdCallback mir_client_fd_callback
165 __attribute__((deprecated("Use MirClientFdCallback instead")));165 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirClientFdCallback instead");
166166
167#pragma GCC diagnostic push167#pragma GCC diagnostic push
168#pragma GCC diagnostic ignored "-Wdeprecated-declarations"168#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -201,7 +201,7 @@
201 * use the value mir_display_output_id_invalid.201 * use the value mir_display_output_id_invalid.
202 */202 */
203 uint32_t output_id;203 uint32_t output_id;
204} MirSurfaceParameters __attribute__((deprecated("Use MirWindowParameters instead")));204} MirSurfaceParameters MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_get apis or listen for attribute events instead");
205205
206enum { mir_platform_package_max = 32 };206enum { mir_platform_package_max = 32 };
207207
@@ -214,7 +214,7 @@
214 * \todo This should be removed from the public API at the next API break.214 * \todo This should be removed from the public API at the next API break.
215 */215 */
216#ifndef __cplusplus216#ifndef __cplusplus
217__attribute__ ((deprecated))217MIR_FOR_REMOVAL_IN_VERSION_1("Use of this type is inherently non-portable")
218#endif218#endif
219typedef enum MirPlatformType219typedef enum MirPlatformType
220{220{
@@ -429,7 +429,7 @@
429typedef void (*MirScreencastCallback)(429typedef void (*MirScreencastCallback)(
430 MirScreencast *screencast, void *client_context);430 MirScreencast *screencast, void *client_context);
431typedef MirScreencastCallback mir_screencast_callback431typedef MirScreencastCallback mir_screencast_callback
432 __attribute__((deprecated("Use MirScreencastCallback instead")));432 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirScreencastCallback instead");
433433
434/**434/**
435 * Callback member of MirPromptSession for handling of prompt sessions.435 * Callback member of MirPromptSession for handling of prompt sessions.
@@ -439,7 +439,7 @@
439typedef void (*MirPromptSessionCallback)(439typedef void (*MirPromptSessionCallback)(
440 MirPromptSession* prompt_provider, void* context);440 MirPromptSession* prompt_provider, void* context);
441typedef MirPromptSessionCallback mir_prompt_session_callback441typedef MirPromptSessionCallback mir_prompt_session_callback
442 __attribute__((deprecated("Use MirPromptSessionCallback instead")));442 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPromptSessionCallback instead");
443443
444/**444/**
445 * Callback member of MirPromptSession for handling of prompt sessions events.445 * Callback member of MirPromptSession for handling of prompt sessions events.
@@ -452,7 +452,7 @@
452 void* context);452 void* context);
453typedef MirPromptSessionStateChangeCallback453typedef MirPromptSessionStateChangeCallback
454 mir_prompt_session_state_change_callback454 mir_prompt_session_state_change_callback
455 __attribute__((deprecated("Use MirPromptSessionStateChangeCallback instead")));455 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPromptSessionStateChangeCallback instead");
456456
457/**457/**
458 * Callback called when a platform operation completes.458 * Callback called when a platform operation completes.
@@ -467,7 +467,7 @@
467typedef void (*MirPlatformOperationCallback)(467typedef void (*MirPlatformOperationCallback)(
468 MirConnection* connection, MirPlatformMessage* reply, void* context);468 MirConnection* connection, MirPlatformMessage* reply, void* context);
469typedef MirPlatformOperationCallback mir_platform_operation_callback469typedef MirPlatformOperationCallback mir_platform_operation_callback
470 __attribute__((deprecated("Use MirPlatformOperationCallback instead")));470 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPlatformOperationCallback instead");
471471
472/**472/**
473 * Callback called when a change of input devices has occurred473 * Callback called when a change of input devices has occurred
@@ -479,7 +479,7 @@
479typedef void (*MirInputConfigCallback)(479typedef void (*MirInputConfigCallback)(
480 MirConnection* connection, void* context);480 MirConnection* connection, void* context);
481typedef MirInputConfigCallback mir_input_config_callback481typedef MirInputConfigCallback mir_input_config_callback
482 __attribute__((deprecated("Use MirInputConfigCallback instead")));482 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirInputConfigCallback instead");
483483
484typedef void (*MirBufferCallback)(MirBuffer*, void* context);484typedef void (*MirBufferCallback)(MirBuffer*, void* context);
485485
@@ -539,24 +539,21 @@
539typedef void (*MirErrorCallback)(539typedef void (*MirErrorCallback)(
540 MirConnection* connection, MirError const* error, void* context);540 MirConnection* connection, MirError const* error, void* context);
541typedef MirErrorCallback mir_error_callback541typedef MirErrorCallback mir_error_callback
542 __attribute__((deprecated("Use MirErrorCallback instead")));542 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirErrorCallback instead");
543543
544#pragma GCC diagnostic push544#pragma GCC diagnostic push
545#pragma GCC diagnostic ignored "-Wdeprecated-declarations"545#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
546546
547typedef void (*mir_surface_callback)(MirSurface *surface, void *client_context)547typedef void (*mir_surface_callback)(MirSurface *surface, void *client_context)
548__attribute__((deprecated("Use MirWindowCallback instead")));548MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowCallback instead");
549549
550typedef void (*mir_surface_event_callback)(550typedef void (*mir_surface_event_callback)(
551 MirSurface* surface, MirEvent const* event, void* context)551 MirSurface* surface, MirEvent const* event, void* context)
552__attribute__((deprecated("Use MirWindowEventCallback instead")));552MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowEventCallback instead");
553553
554typedef void (*mir_surface_id_callback)(554typedef void (*mir_surface_id_callback)(
555 MirSurface* surface, MirPersistentId* id, void* context)555 MirSurface* surface, MirPersistentId* id, void* context)
556__attribute__((deprecated("Use MirWindowIdCallback instead")));556MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowIdCallback instead");
557
558typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context)
559__attribute__((deprecated("This type is slated for rename due to MirRenderSurface-->MirSurface transition")));
560557
561typedef MirSurfaceParameters MirWindowParameters;558typedef MirSurfaceParameters MirWindowParameters;
562559
563560
=== modified file 'include/client/mir_toolkit/debug/surface.h'
--- include/client/mir_toolkit/debug/surface.h 2017-01-18 04:43:15 +0000
+++ include/client/mir_toolkit/debug/surface.h 2017-06-05 10:39:04 +0000
@@ -19,6 +19,7 @@
19#define MIR_CLIENT_LIBRARY_DEBUG_H19#define MIR_CLIENT_LIBRARY_DEBUG_H
2020
21#include <mir_toolkit/mir_client_library.h>21#include <mir_toolkit/mir_client_library.h>
22#include <mir_toolkit/deprecations.h>
2223
23/* This header defines debug interfaces that aren't expected to be generally useful24/* This header defines debug interfaces that aren't expected to be generally useful
24 * and do not have the same API-stability guarantees that the main API has */25 * and do not have the same API-stability guarantees that the main API has */
@@ -65,13 +66,13 @@
65bool mir_debug_surface_coords_to_screen(MirSurface *surface,66bool mir_debug_surface_coords_to_screen(MirSurface *surface,
66 int x, int y,67 int x, int y,
67 int* screen_x, int* screen_y)68 int* screen_x, int* screen_y)
68__attribute__((deprecated("Use mir_extension_window_coordinate_translation instead")));69MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_extension_window_coordinate_translation instead");
6970
70int mir_debug_surface_id(MirSurface *surface)71int mir_debug_surface_id(MirSurface *surface)
71__attribute__((deprecated("Use mir_debug_window_id() instead")));72MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_debug_window_id() instead");
7273
73uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface)74uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface)
74__attribute__((deprecated("Use mir_debug_window_current_buffer_id() instead")));75MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_debug_window_current_buffer_id() instead");
7576
76#pragma GCC diagnostic pop77#pragma GCC diagnostic pop
7778
7879
=== modified file 'include/client/mir_toolkit/events/event.h'
--- include/client/mir_toolkit/events/event.h 2017-01-25 08:12:00 +0000
+++ include/client/mir_toolkit/events/event.h 2017-06-05 10:39:04 +0000
@@ -22,6 +22,7 @@
22#include <stddef.h>22#include <stddef.h>
23#include <stdint.h>23#include <stdint.h>
24#include "mir_toolkit/common.h"24#include "mir_toolkit/common.h"
25#include <mir_toolkit/deprecations.h>
2526
26#ifdef __cplusplus27#ifdef __cplusplus
27/**28/**
@@ -58,24 +59,24 @@
58#pragma GCC diagnostic pop59#pragma GCC diagnostic pop
5960
60typedef struct MirSurfaceEvent MirSurfaceEvent61typedef struct MirSurfaceEvent MirSurfaceEvent
61 __attribute__ ((deprecated("use MirWindowEvent instead")));62 MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowEvent instead");
62typedef struct MirSurfaceEvent MirWindowEvent;63typedef struct MirSurfaceEvent MirWindowEvent;
63typedef struct MirResizeEvent MirResizeEvent;64typedef struct MirResizeEvent MirResizeEvent;
64typedef struct MirPromptSessionEvent MirPromptSessionEvent;65typedef struct MirPromptSessionEvent MirPromptSessionEvent;
65typedef struct MirOrientationEvent MirOrientationEvent;66typedef struct MirOrientationEvent MirOrientationEvent;
66typedef struct MirCloseSurfaceEvent MirCloseSurfaceEvent67typedef struct MirCloseSurfaceEvent MirCloseSurfaceEvent
67 __attribute__ ((deprecated("use MirCloseWindowEvent instead")));68 MIR_FOR_REMOVAL_IN_VERSION_1("use MirCloseWindowEvent instead");
68typedef struct MirCloseSurfaceEvent MirCloseWindowEvent;69typedef struct MirCloseSurfaceEvent MirCloseWindowEvent;
69typedef struct MirInputEvent MirInputEvent;70typedef struct MirInputEvent MirInputEvent;
70typedef struct MirKeymapEvent MirKeymapEvent;71typedef struct MirKeymapEvent MirKeymapEvent;
71typedef struct MirInputConfigurationEvent MirInputConfigurationEvent 72typedef struct MirInputConfigurationEvent MirInputConfigurationEvent
72 __attribute__ ((deprecated("Use MirInputDeviceStateEvent and the MirInputConfig callback instead")));73 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirInputDeviceStateEvent and the MirInputConfig callback instead");
73typedef struct MirSurfaceOutputEvent MirSurfaceOutputEvent74typedef struct MirSurfaceOutputEvent MirSurfaceOutputEvent
74 __attribute__ ((deprecated("use MirWindowOutputEvent instead")));75 MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowOutputEvent instead");
75typedef struct MirSurfaceOutputEvent MirWindowOutputEvent;76typedef struct MirSurfaceOutputEvent MirWindowOutputEvent;
76typedef struct MirInputDeviceStateEvent MirInputDeviceStateEvent;77typedef struct MirInputDeviceStateEvent MirInputDeviceStateEvent;
77typedef struct MirSurfacePlacementEvent MirSurfacePlacementEvent78typedef struct MirSurfacePlacementEvent MirSurfacePlacementEvent
78 __attribute__ ((deprecated("use MirWindowPlacementEvent instead")));79 MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowPlacementEvent instead");
79typedef struct MirSurfacePlacementEvent MirWindowPlacementEvent;80typedef struct MirSurfacePlacementEvent MirWindowPlacementEvent;
8081
81typedef struct MirCookie MirCookie;82typedef struct MirCookie MirCookie;
@@ -136,7 +137,7 @@
136 * \return The associated MirSurfaceEvent137 * \return The associated MirSurfaceEvent
137 */138 */
138MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* event)139MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* event)
139__attribute__ ((deprecated("use mir_event_get_window_event instead")));140MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_event instead");
140141
141/**142/**
142 * Retrieve the MirWindowEvent associated with a MirEvent of143 * Retrieve the MirWindowEvent associated with a MirEvent of
@@ -195,7 +196,7 @@
195 * \return The associated MirCloseSurfaceEvent196 * \return The associated MirCloseSurfaceEvent
196 */197 */
197/// @cond198/// @cond
198__attribute__ ((deprecated))199MIR_FOR_REMOVAL_IN_VERSION_1("Use of this function is pointless as there is no way to use the return value")
199/// @endcond200/// @endcond
200MirCloseSurfaceEvent const* mir_event_get_close_surface_event(MirEvent const* event);201MirCloseSurfaceEvent const* mir_event_get_close_surface_event(MirEvent const* event);
201#pragma GCC diagnostic pop202#pragma GCC diagnostic pop
@@ -223,7 +224,7 @@
223 * \return The associated MirInputConfigurationEvent224 * \return The associated MirInputConfigurationEvent
224 */225 */
225/// @cond226/// @cond
226__attribute__((deprecated))227MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback")
227/// @endcond228/// @endcond
228MirInputConfigurationEvent const* mir_event_get_input_configuration_event(MirEvent const* event);229MirInputConfigurationEvent const* mir_event_get_input_configuration_event(MirEvent const* event);
229#pragma GCC diagnostic pop230#pragma GCC diagnostic pop
@@ -242,7 +243,7 @@
242 * \return The associated MirSurfaceOutputEvent243 * \return The associated MirSurfaceOutputEvent
243 */244 */
244MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* event)245MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* event)
245__attribute__((deprecated("use mir_event_get_window_output_event")));246MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_output_event");
246247
247/**248/**
248 * Retrieve the MirWindowOutputEvent associated with a MirEvent of type249 * Retrieve the MirWindowOutputEvent associated with a MirEvent of type
@@ -279,7 +280,7 @@
279 * \return The associated MirSurfacePlacementEvent280 * \return The associated MirSurfacePlacementEvent
280 */281 */
281MirSurfacePlacementEvent const* mir_event_get_surface_placement_event(MirEvent const* event)282MirSurfacePlacementEvent const* mir_event_get_surface_placement_event(MirEvent const* event)
282__attribute__((deprecated("use mir_event_get_window_placement_event")));283MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_placement_event");
283284
284/**285/**
285 * Retrieve the MirWindowPlacementEvent associated with a MirEvent of286 * Retrieve the MirWindowPlacementEvent associated with a MirEvent of
286287
=== modified file 'include/client/mir_toolkit/events/input_configuration_event.h'
--- include/client/mir_toolkit/events/input_configuration_event.h 2017-01-20 16:27:50 +0000
+++ include/client/mir_toolkit/events/input_configuration_event.h 2017-06-05 10:39:04 +0000
@@ -20,6 +20,7 @@
20#define MIR_TOOLKIT_EVENTS_INPUT_CONFIGURATION_EVENT_H_20#define MIR_TOOLKIT_EVENTS_INPUT_CONFIGURATION_EVENT_H_
2121
22#include <mir_toolkit/events/event.h>22#include <mir_toolkit/events/event.h>
23#include <mir_toolkit/deprecations.h>
2324
24#ifdef __cplusplus25#ifdef __cplusplus
25/**26/**
@@ -45,7 +46,7 @@
45 mir_input_configuration_action_configuration_changed,46 mir_input_configuration_action_configuration_changed,
46 mir_input_configuration_action_device_reset47 mir_input_configuration_action_device_reset
47} MirInputConfigurationAction48} MirInputConfigurationAction
48__attribute__((deprecated));49MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
4950
50#pragma GCC diagnostic push51#pragma GCC diagnostic push
51#pragma GCC diagnostic ignored "-Wdeprecated-declarations"52#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -55,7 +56,8 @@
55 * \param[in] ev The input configuration event56 * \param[in] ev The input configuration event
56 * \return The action57 * \return The action
57 */58 */
58MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const* ev) __attribute__((deprecated));59MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const* ev)
60MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
5961
60/**62/**
61 * Retreive the time associated with a MirInputConfiguration event63 * Retreive the time associated with a MirInputConfiguration event
@@ -63,7 +65,8 @@
63 * \param[in] ev The input configuration event65 * \param[in] ev The input configuration event
64 * \return The time in nanoseconds since epoch66 * \return The time in nanoseconds since epoch
65 */67 */
66int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const* ev) __attribute__((deprecated));68int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const* ev)
69MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
6770
68/**71/**
69 * Retreive the device id associated with a MirInputConfiguration event72 * Retreive the device id associated with a MirInputConfiguration event
@@ -71,7 +74,8 @@
71 * \param[in] ev The input configuration event74 * \param[in] ev The input configuration event
72 * \return The device id or -1 if not applicable to events of this action75 * \return The device id or -1 if not applicable to events of this action
73 */76 */
74MirInputDeviceId mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const* ev) __attribute__((deprecated));77MirInputDeviceId mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const* ev)
78MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback");
75#pragma GCC diagnostic pop79#pragma GCC diagnostic pop
7680
77#ifdef __cplusplus81#ifdef __cplusplus
7882
=== modified file 'include/client/mir_toolkit/events/keymap_event.h'
--- include/client/mir_toolkit/events/keymap_event.h 2017-01-18 02:29:37 +0000
+++ include/client/mir_toolkit/events/keymap_event.h 2017-06-05 10:39:04 +0000
@@ -42,7 +42,7 @@
42 */42 */
43void mir_keymap_event_get_rules(MirKeymapEvent const* ev,43void mir_keymap_event_get_rules(MirKeymapEvent const* ev,
44 struct xkb_rule_names* rules)44 struct xkb_rule_names* rules)
45 __attribute__ ((deprecated));45MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_keymap_event_get_keymap_buffer() instead");
4646
47/**47/**
48 * Retrieve the new keymap reported by this MirKeymapEvent48 * Retrieve the new keymap reported by this MirKeymapEvent
4949
=== modified file 'include/client/mir_toolkit/events/surface_event.h'
--- include/client/mir_toolkit/events/surface_event.h 2017-01-23 03:38:33 +0000
+++ include/client/mir_toolkit/events/surface_event.h 2017-06-05 10:39:04 +0000
@@ -20,6 +20,7 @@
20#define MIR_TOOLKIT_EVENTS_SURFACE_EVENT_H_20#define MIR_TOOLKIT_EVENTS_SURFACE_EVENT_H_
2121
22#include <mir_toolkit/events/event.h>22#include <mir_toolkit/events/event.h>
23#include <mir_toolkit/deprecations.h>
2324
24#ifdef __cplusplus25#ifdef __cplusplus
25/**26/**
@@ -39,7 +40,7 @@
39 * \return The associated attribute40 * \return The associated attribute
40 */41 */
41MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* event)42MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* event)
42__attribute__ ((deprecated("use mir_window_event_get_attribute instead")));43MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_event_get_attribute instead");
4344
44/**45/**
45 * Retrieve the new value of the associated attribute for a given MirSurfaceEvent46 * Retrieve the new value of the associated attribute for a given MirSurfaceEvent
@@ -48,7 +49,7 @@
48 * \return The associated attribute value49 * \return The associated attribute value
49 */50 */
50int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event)51int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event)
51__attribute__ ((deprecated("use make_event with mir_window_event_get_attribute_value instead")));52MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_event_get_attribute_value with MirWindowEvent instead");
52#pragma GCC diagnostic pop53#pragma GCC diagnostic pop
5354
54#ifdef __cplusplus55#ifdef __cplusplus
5556
=== modified file 'include/client/mir_toolkit/events/surface_output_event.h'
--- include/client/mir_toolkit/events/surface_output_event.h 2017-01-23 03:38:33 +0000
+++ include/client/mir_toolkit/events/surface_output_event.h 2017-06-05 10:39:04 +0000
@@ -20,6 +20,7 @@
20#define MIR_TOOLKIT_SURFACE_OUTPUT_EVENT_H_20#define MIR_TOOLKIT_SURFACE_OUTPUT_EVENT_H_
2121
22#include <mir_toolkit/events/event.h>22#include <mir_toolkit/events/event.h>
23#include <mir_toolkit/deprecations.h>
2324
24#ifdef __cplusplus25#ifdef __cplusplus
25/**26/**
@@ -39,7 +40,7 @@
39 * \return The new DPI value for the surface is primarily on.40 * \return The new DPI value for the surface is primarily on.
40 */41 */
41int mir_surface_output_event_get_dpi(MirSurfaceOutputEvent const* ev)42int mir_surface_output_event_get_dpi(MirSurfaceOutputEvent const* ev)
42__attribute__ ((deprecated("use mir_window_output_event_get_dpi instead")));43MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_dpi instead");
4344
44/**45/**
45 * Retrieve the form factor of the new output configuration of a MirSurfaceOutputEvent46 * Retrieve the form factor of the new output configuration of a MirSurfaceOutputEvent
@@ -48,7 +49,7 @@
48 * \return The new form factor of the output the surface is primarily on.49 * \return The new form factor of the output the surface is primarily on.
49 */50 */
50MirFormFactor mir_surface_output_event_get_form_factor(MirSurfaceOutputEvent const* ev)51MirFormFactor mir_surface_output_event_get_form_factor(MirSurfaceOutputEvent const* ev)
51__attribute__ ((deprecated("use mir_window_output_event_get_form_factor instead")));52MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_form_factor instead");
5253
53/**54/**
54 * Retrieve the suggested scaling factor of the new output configuration of a55 * Retrieve the suggested scaling factor of the new output configuration of a
@@ -58,7 +59,7 @@
58 * \return The new scaling factor of the output the surface is primarily on.59 * \return The new scaling factor of the output the surface is primarily on.
59 */60 */
60float mir_surface_output_event_get_scale(MirSurfaceOutputEvent const* ev)61float mir_surface_output_event_get_scale(MirSurfaceOutputEvent const* ev)
61__attribute__ ((deprecated("use mir_window_output_event_get_scale instead")));62MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_scale instead");
6263
63/**64/**
64 * Retrieve the maximum refresh rate of the output(s) associated with a65 * Retrieve the maximum refresh rate of the output(s) associated with a
@@ -70,7 +71,7 @@
70 * \return The refresh rate in Hz71 * \return The refresh rate in Hz
71 */72 */
72double mir_surface_output_event_get_refresh_rate(MirSurfaceOutputEvent const* ev)73double mir_surface_output_event_get_refresh_rate(MirSurfaceOutputEvent const* ev)
73__attribute__ ((deprecated("use mir_window_output_event_get_refresh_rate instead")));74MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_refresh_rate instead");
7475
75/**76/**
76 * Retrieve the ID of the output this surface is on from a MirSurfaceOutputEvent77 * Retrieve the ID of the output this surface is on from a MirSurfaceOutputEvent
@@ -80,7 +81,7 @@
80 * (From MirDisplayOutput::output_id)81 * (From MirDisplayOutput::output_id)
81 */82 */
82uint32_t mir_surface_output_event_get_output_id(MirSurfaceOutputEvent const *ev)83uint32_t mir_surface_output_event_get_output_id(MirSurfaceOutputEvent const *ev)
83__attribute__ ((deprecated("use mir_window_output_event_get_output_id instead")));84MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_output_id instead");
8485
85#pragma GCC diagnostic pop86#pragma GCC diagnostic pop
8687
8788
=== modified file 'include/client/mir_toolkit/events/surface_placement.h'
--- include/client/mir_toolkit/events/surface_placement.h 2017-01-19 05:30:03 +0000
+++ include/client/mir_toolkit/events/surface_placement.h 2017-06-05 10:39:04 +0000
@@ -20,6 +20,7 @@
20#define MIR_TOOLKIT_SURFACE_PLACEMENT_H_20#define MIR_TOOLKIT_SURFACE_PLACEMENT_H_
2121
22#include <mir_toolkit/client_types.h>22#include <mir_toolkit/client_types.h>
23#include <mir_toolkit/deprecations.h>
2324
24#ifdef __cplusplus25#ifdef __cplusplus
25/**26/**
@@ -38,7 +39,7 @@
38 * \return The position relative to the parent surface39 * \return The position relative to the parent surface
39 */40 */
40MirRectangle mir_surface_placement_get_relative_position(MirSurfacePlacementEvent const* event)41MirRectangle mir_surface_placement_get_relative_position(MirSurfacePlacementEvent const* event)
41__attribute__ ((deprecated("use mir_window_placement_get_relative_position instead")));42MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_placement_get_relative_position instead");
4243
43#ifdef __cplusplus44#ifdef __cplusplus
44}45}
4546
=== modified file 'include/client/mir_toolkit/mir_blob.h'
--- include/client/mir_toolkit/mir_blob.h 2017-01-19 05:30:03 +0000
+++ include/client/mir_toolkit/mir_blob.h 2017-06-05 10:39:04 +0000
@@ -19,6 +19,7 @@
19#define MIR_TOOLKIT_MIR_BLOB_H_19#define MIR_TOOLKIT_MIR_BLOB_H_
2020
21#include <mir_toolkit/client_types.h>21#include <mir_toolkit/client_types.h>
22#include <mir_toolkit/deprecations.h>
2223
23#ifdef __cplusplus24#ifdef __cplusplus
24/**25/**
@@ -35,7 +36,7 @@
35 * \return A blob36 * \return A blob
36 */37 */
37MirBlob* mir_blob_from_display_configuration(MirDisplayConfiguration* configuration)38MirBlob* mir_blob_from_display_configuration(MirDisplayConfiguration* configuration)
38__attribute__ ((deprecated("use mir_blob_from_display_config instead")));39MIR_FOR_REMOVAL_IN_VERSION_1("use mir_blob_from_display_config instead");
3940
40/**41/**
41 * Create a blob from a display config42 * Create a blob from a display config
@@ -65,7 +66,7 @@
65 * \return A display configuration66 * \return A display configuration
66 */67 */
67MirDisplayConfiguration* mir_blob_to_display_configuration(MirBlob* blob)68MirDisplayConfiguration* mir_blob_to_display_configuration(MirBlob* blob)
68__attribute__ ((deprecated("use mir_blob_to_display_config instead")));69MIR_FOR_REMOVAL_IN_VERSION_1("use mir_blob_to_display_config instead");
6970
70/**71/**
71 * Create a blob from a display config72 * Create a blob from a display config
7273
=== modified file 'include/client/mir_toolkit/mir_buffer_stream.h'
--- include/client/mir_toolkit/mir_buffer_stream.h 2017-01-24 07:49:13 +0000
+++ include/client/mir_toolkit/mir_buffer_stream.h 2017-06-05 10:39:04 +0000
@@ -20,6 +20,7 @@
2020
21#include <mir_toolkit/mir_native_buffer.h>21#include <mir_toolkit/mir_native_buffer.h>
22#include <mir_toolkit/client_types.h>22#include <mir_toolkit/client_types.h>
23#include <mir_toolkit/deprecations.h>
2324
24#ifdef __cplusplus25#ifdef __cplusplus
25/**26/**
@@ -141,7 +142,8 @@
141 * mir_platform_type_gbm142 * mir_platform_type_gbm
142 */143 */
143/// @cond144/// @cond
144__attribute__ ((deprecated))145MIR_FOR_REMOVAL_IN_VERSION_1("To identify the graphics platform use mir_connection_get_graphics_module(). \n"
146 "To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region()")
145/// @endcond147/// @endcond
146MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream);148MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream);
147149
148150
=== modified file 'include/client/mir_toolkit/mir_connection.h'
--- include/client/mir_toolkit/mir_connection.h 2017-01-24 19:53:45 +0000
+++ include/client/mir_toolkit/mir_connection.h 2017-06-05 10:39:04 +0000
@@ -20,6 +20,7 @@
2020
21#include <mir_toolkit/client_types.h>21#include <mir_toolkit/client_types.h>
22#include <mir_toolkit/common.h>22#include <mir_toolkit/common.h>
23#include <mir_toolkit/deprecations.h>
2324
24#include <stdbool.h>25#include <stdbool.h>
2526
@@ -93,7 +94,7 @@
93 * \param [out] platform_package Structure to be populated94 * \param [out] platform_package Structure to be populated
94 */95 */
95void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package)96void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package)
96__attribute__((deprecated("use platform extensions instead")));97MIR_FOR_REMOVAL_IN_VERSION_1("use platform extensions instead");
9798
98/**99/**
99 * Query graphics platform module.100 * Query graphics platform module.
@@ -105,7 +106,7 @@
105 * \param [out] properties Structure to be populated106 * \param [out] properties Structure to be populated
106 */107 */
107void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties)108void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties)
108__attribute__((deprecated("use graphics module extension instead")));109MIR_FOR_REMOVAL_IN_VERSION_1("use graphics module extension instead");
109110
110/**111/**
111 * Register a callback to be called when a Lifecycle state change occurs.112 * Register a callback to be called when a Lifecycle state change occurs.
@@ -156,7 +157,7 @@
156 * \return structure that describes the display configuration157 * \return structure that describes the display configuration
157 */158 */
158MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection)159MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection)
159__attribute__ ((deprecated("use mir_connection_create_display_configuration instead")));160MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_create_display_configuration instead");
160161
161/**162/**
162 * Query the display163 * Query the display
@@ -188,7 +189,7 @@
188 * \param [in] display_configuration The display_configuration information resource to be destroyed189 * \param [in] display_configuration The display_configuration information resource to be destroyed
189 */190 */
190void mir_display_config_destroy(MirDisplayConfiguration* display_configuration)191void mir_display_config_destroy(MirDisplayConfiguration* display_configuration)
191__attribute__ ((deprecated("use mir_display_config_release instead")));192MIR_FOR_REMOVAL_IN_VERSION_1("use mir_display_config_release instead");
192193
193/**194/**
194 * Apply the display configuration195 * Apply the display configuration
@@ -204,7 +205,7 @@
204 * \return A handle that can be passed to mir_wait_for205 * \return A handle that can be passed to mir_wait_for
205 */206 */
206MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration)207MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration)
207__attribute__ ((deprecated("use mir_connection_apply_session_display_config instead")));208MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_apply_session_display_config instead");
208209
209/**210/**
210 * Apply the display config for the connection211 * Apply the display config for the connection
@@ -254,7 +255,7 @@
254MirWaitHandle* mir_connection_set_base_display_config(255MirWaitHandle* mir_connection_set_base_display_config(
255 MirConnection* connection,256 MirConnection* connection,
256 MirDisplayConfiguration const* display_configuration)257 MirDisplayConfiguration const* display_configuration)
257__attribute__ ((deprecated("use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration")));258MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration");
258259
259260
260/**261/**
@@ -379,7 +380,7 @@
379 MirConnection* connection,380 MirConnection* connection,
380 MirPlatformMessage const* request,381 MirPlatformMessage const* request,
381 MirPlatformOperationCallback callback, void* context)382 MirPlatformOperationCallback callback, void* context)
382__attribute__ ((deprecated("use platform specific extensions instead")));383MIR_FOR_REMOVAL_IN_VERSION_1("use platform specific extensions instead");
383384
384/**385/**
385 * Create a snapshot of the attached input devices and device configurations.386 * Create a snapshot of the attached input devices and device configurations.
@@ -399,7 +400,7 @@
399 * \param [in] config The input configuration400 * \param [in] config The input configuration
400 */401 */
401void mir_input_config_destroy(MirInputConfig const* config)402void mir_input_config_destroy(MirInputConfig const* config)
402__attribute__ ((deprecated("use mir_input_config_release instead")));403MIR_FOR_REMOVAL_IN_VERSION_1("use mir_input_config_release instead");
403404
404/**405/**
405 * Release this snapshot of the input configuration.406 * Release this snapshot of the input configuration.
406407
=== modified file 'include/client/mir_toolkit/mir_cursor_configuration.h'
--- include/client/mir_toolkit/mir_cursor_configuration.h 2017-01-18 02:29:37 +0000
+++ include/client/mir_toolkit/mir_cursor_configuration.h 2017-06-05 10:39:04 +0000
@@ -20,6 +20,7 @@
2020
21#include <mir_toolkit/common.h>21#include <mir_toolkit/common.h>
22#include <mir_toolkit/client_types.h>22#include <mir_toolkit/client_types.h>
23#include <mir_toolkit/deprecations.h>
2324
24/**25/**
25 * Opaque structure containing cursor parameterization. Create with mir_cursor* family.26 * Opaque structure containing cursor parameterization. Create with mir_cursor* family.
@@ -53,7 +54,7 @@
53 * to_mir_cursor_configuration_destroy54 * to_mir_cursor_configuration_destroy
54 */55 */
55/// @cond56/// @cond
56__attribute__ ((deprecated))57MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_cursor_name()")
57/// @endcond58/// @endcond
58MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name);59MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name);
5960
6061
=== modified file 'include/client/mir_toolkit/mir_display_configuration.h'
--- include/client/mir_toolkit/mir_display_configuration.h 2017-02-20 05:36:21 +0000
+++ include/client/mir_toolkit/mir_display_configuration.h 2017-06-05 10:39:04 +0000
@@ -20,6 +20,7 @@
20#define MIR_TOOLKIT_MIR_DISPLAY_CONFIGURATION_H_20#define MIR_TOOLKIT_MIR_DISPLAY_CONFIGURATION_H_
2121
22#include "client_types.h"22#include "client_types.h"
23#include <mir_toolkit/deprecations.h>
2324
24#ifdef __cplusplus25#ifdef __cplusplus
25extern "C" {26extern "C" {
@@ -60,7 +61,7 @@
60 */61 */
61int mir_display_config_get_max_simultaneous_outputs(62int mir_display_config_get_max_simultaneous_outputs(
62 MirDisplayConfig const* config)63 MirDisplayConfig const* config)
63 __attribute__((deprecated("Not accurate in Mir 0.26 and later. May be removed in future.")));64 MIR_FOR_REMOVAL_IN_VERSION_1("Not accurate in Mir 0.26 and later. May be removed in future.");
6465
65/**66/**
66 * Get the number of outputs available in this display configuration.67 * Get the number of outputs available in this display configuration.
@@ -268,7 +269,7 @@
268 * \returns The name of the output type.269 * \returns The name of the output type.
269 */270 */
270char const* mir_display_output_type_name(MirDisplayOutputType type)271char const* mir_display_output_type_name(MirDisplayOutputType type)
271__attribute__((deprecated("use mir_output_type_name instead")));272MIR_FOR_REMOVAL_IN_VERSION_1("use mir_output_type_name instead");
272273
273/**274/**
274 * Get the textual name of an output type.275 * Get the textual name of an output type.
275276
=== modified file 'include/client/mir_toolkit/mir_persistent_id.h'
--- include/client/mir_toolkit/mir_persistent_id.h 2017-02-02 19:52:04 +0000
+++ include/client/mir_toolkit/mir_persistent_id.h 2017-06-05 10:39:04 +0000
@@ -19,6 +19,7 @@
19#define MIR_TOOLKIT_MIR_PERSISTENT_ID_H_19#define MIR_TOOLKIT_MIR_PERSISTENT_ID_H_
2020
21#include <mir_toolkit/client_types.h>21#include <mir_toolkit/client_types.h>
22#include <mir_toolkit/deprecations.h>
2223
23#include <stdbool.h>24#include <stdbool.h>
2425
@@ -39,7 +40,7 @@
39 * \note This does not guarantee that the ID refers to a currently valid object.40 * \note This does not guarantee that the ID refers to a currently valid object.
40 */41 */
41bool mir_persistent_id_is_valid(MirPersistentId* id)42bool mir_persistent_id_is_valid(MirPersistentId* id)
42__attribute__((deprecated("Use mir_window_id_is_valid() instead")));43MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_is_valid() instead");
4344
44/**45/**
45 * \brief Free a MirPersistentId46 * \brief Free a MirPersistentId
@@ -48,7 +49,7 @@
48 * object referred to by \arg id.49 * object referred to by \arg id.
49 */50 */
50void mir_persistent_id_release(MirPersistentId* id)51void mir_persistent_id_release(MirPersistentId* id)
51__attribute__((deprecated("Use mir_window_id_release() instead")));52MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_release() instead");
5253
53/**54/**
54 * \brief Get a string representation of a MirSurfaceId55 * \brief Get a string representation of a MirSurfaceId
@@ -59,7 +60,7 @@
59 * \see mir_surface_id_from_string60 * \see mir_surface_id_from_string
60 */61 */
61char const* mir_persistent_id_as_string(MirPersistentId* id)62char const* mir_persistent_id_as_string(MirPersistentId* id)
62__attribute__((deprecated("Use mir_window_id_as_string() instead")));63MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_as_string() instead");
6364
64/**65/**
65 * \brief Deserialise a string representation of a MirSurfaceId66 * \brief Deserialise a string representation of a MirSurfaceId
@@ -67,7 +68,7 @@
67 * \return The deserialised MirSurfaceId68 * \return The deserialised MirSurfaceId
68 */69 */
69MirPersistentId* mir_persistent_id_from_string(char const* string_representation)70MirPersistentId* mir_persistent_id_from_string(char const* string_representation)
70__attribute__((deprecated("Use mir_window_id_from_string() instead")));71MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_from_string() instead");
7172
72#pragma GCC diagnostic pop73#pragma GCC diagnostic pop
7374
7475
=== modified file 'include/client/mir_toolkit/mir_platform_message.h'
--- include/client/mir_toolkit/mir_platform_message.h 2017-01-18 02:29:37 +0000
+++ include/client/mir_toolkit/mir_platform_message.h 2017-06-05 10:39:04 +0000
@@ -19,6 +19,7 @@
19#define MIR_TOOLKIT_MIR_PLATFORM_MESSAGE_H_19#define MIR_TOOLKIT_MIR_PLATFORM_MESSAGE_H_
2020
21#include <sys/types.h>21#include <sys/types.h>
22#include <mir_toolkit/deprecations.h>
2223
23#ifdef __cplusplus24#ifdef __cplusplus
24/**25/**
@@ -51,7 +52,7 @@
51 * \param [in] opcode The platform message opcode52 * \param [in] opcode The platform message opcode
52 * \return The created MirPlatformMessage53 * \return The created MirPlatformMessage
53 */54 */
54__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))55MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
55MirPlatformMessage* mir_platform_message_create(unsigned int opcode);56MirPlatformMessage* mir_platform_message_create(unsigned int opcode);
5657
57/**58/**
@@ -59,7 +60,7 @@
59 *60 *
60 * \param [in] message The MirPlatformMessage61 * \param [in] message The MirPlatformMessage
61 */62 */
62__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))63MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
63void mir_platform_message_release(MirPlatformMessage const* message);64void mir_platform_message_release(MirPlatformMessage const* message);
6465
65/**66/**
@@ -71,7 +72,7 @@
71 * \param [in] data Pointer to the data72 * \param [in] data Pointer to the data
72 * \param [in] data_size The size of the data in bytes73 * \param [in] data_size The size of the data in bytes
73 */74 */
74__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))75MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
75void mir_platform_message_set_data(MirPlatformMessage* message, void const* data, size_t data_size);76void mir_platform_message_set_data(MirPlatformMessage* message, void const* data, size_t data_size);
7677
77/**78/**
@@ -89,7 +90,7 @@
89 * \param [in] fds Pointer to the array of fds90 * \param [in] fds Pointer to the array of fds
90 * \param [in] num_fds The number of fds91 * \param [in] num_fds The number of fds
91 */92 */
92__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))93MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
93void mir_platform_message_set_fds(MirPlatformMessage* message, int const* fds, size_t num_fds);94void mir_platform_message_set_fds(MirPlatformMessage* message, int const* fds, size_t num_fds);
9495
95/**96/**
@@ -98,7 +99,7 @@
98 * \param [in] message The MirPlatformMessage99 * \param [in] message The MirPlatformMessage
99 * \return The opcode100 * \return The opcode
100 */101 */
101__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))102MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
102unsigned int mir_platform_message_get_opcode(MirPlatformMessage const* message);103unsigned int mir_platform_message_get_opcode(MirPlatformMessage const* message);
103104
104/**105/**
@@ -111,7 +112,7 @@
111 * \param [in] message The MirPlatformMessage112 * \param [in] message The MirPlatformMessage
112 * \return The data113 * \return The data
113 */114 */
114__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))115MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
115MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const* message);116MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const* message);
116117
117/**118/**
@@ -128,7 +129,7 @@
128 * \param [in] message The MirPlatformMessage129 * \param [in] message The MirPlatformMessage
129 * \return The fds130 * \return The fds
130 */131 */
131__attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")))132MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device")
132MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const* message);133MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const* message);
133134
134#ifdef __cplusplus135#ifdef __cplusplus
135136
=== modified file 'include/client/mir_toolkit/mir_screencast.h'
--- include/client/mir_toolkit/mir_screencast.h 2017-01-19 05:30:03 +0000
+++ include/client/mir_toolkit/mir_screencast.h 2017-06-05 10:39:04 +0000
@@ -18,6 +18,7 @@
18#define MIR_TOOLKIT_MIR_SCREENCAST_H_18#define MIR_TOOLKIT_MIR_SCREENCAST_H_
1919
20#include <mir_toolkit/client_types.h>20#include <mir_toolkit/client_types.h>
21#include <mir_toolkit/deprecations.h>
2122
22#ifdef __cplusplus23#ifdef __cplusplus
23/**24/**
@@ -143,7 +144,7 @@
143MirScreencast* mir_connection_create_screencast_sync(144MirScreencast* mir_connection_create_screencast_sync(
144 MirConnection* connection,145 MirConnection* connection,
145 MirScreencastParameters* parameters)146 MirScreencastParameters* parameters)
146__attribute__ ((deprecated("use mir_screencast_create_sync instead")));147MIR_FOR_REMOVAL_IN_VERSION_1("use mir_screencast_create_sync instead");
147148
148/**149/**
149 * Release the specified screencast.150 * Release the specified screencast.
150151
=== modified file 'include/client/mir_toolkit/mir_surface.h'
--- include/client/mir_toolkit/mir_surface.h 2017-01-24 11:06:35 +0000
+++ include/client/mir_toolkit/mir_surface.h 2017-06-05 10:39:04 +0000
@@ -22,6 +22,7 @@
22#include <mir_toolkit/client_types.h>22#include <mir_toolkit/client_types.h>
23#include <mir_toolkit/common.h>23#include <mir_toolkit/common.h>
24#include <mir_toolkit/mir_cursor_configuration.h>24#include <mir_toolkit/mir_cursor_configuration.h>
25#include <mir_toolkit/deprecations.h>
2526
26#include <stdbool.h>27#include <stdbool.h>
2728
@@ -40,7 +41,7 @@
40MirSurfaceSpec* mir_connection_create_spec_for_normal_surface(MirConnection* connection,41MirSurfaceSpec* mir_connection_create_spec_for_normal_surface(MirConnection* connection,
41 int width, int height,42 int width, int height,
42 MirPixelFormat format)43 MirPixelFormat format)
43__attribute__((deprecated("Use mir_create_normal_window_spec() instead")));44MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_normal_window_spec() instead");
4445
45MirSurfaceSpec*46MirSurfaceSpec*
46mir_connection_create_spec_for_menu(MirConnection* connection,47mir_connection_create_spec_for_menu(MirConnection* connection,
@@ -50,7 +51,7 @@
50 MirSurface* parent,51 MirSurface* parent,
51 MirRectangle* rect,52 MirRectangle* rect,
52 MirEdgeAttachment edge)53 MirEdgeAttachment edge)
53__attribute__((deprecated("Use mir_specify_menu() instead")));54MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_specify_menu() instead");
5455
55MirSurfaceSpec*56MirSurfaceSpec*
56mir_connection_create_spec_for_tooltip(MirConnection* connection,57mir_connection_create_spec_for_tooltip(MirConnection* connection,
@@ -58,7 +59,7 @@
58 MirPixelFormat format,59 MirPixelFormat format,
59 MirSurface* parent,60 MirSurface* parent,
60 MirRectangle* zone)61 MirRectangle* zone)
61__attribute__((deprecated("Use mir_create_tip_window_spec() instead")));62MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_tip_window_spec() instead");
6263
63MirSurfaceSpec*64MirSurfaceSpec*
64mir_connection_create_spec_for_tip(MirConnection* connection,65mir_connection_create_spec_for_tip(MirConnection* connection,
@@ -67,30 +68,30 @@
67 MirSurface* parent,68 MirSurface* parent,
68 MirRectangle* rect,69 MirRectangle* rect,
69 MirEdgeAttachment edge)70 MirEdgeAttachment edge)
70__attribute__((deprecated("Use mir_create_tip_window_spec() instead")));71MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_tip_window_spec() instead");
7172
72MirSurfaceSpec*73MirSurfaceSpec*
73mir_connection_create_spec_for_modal_dialog(MirConnection* connection,74mir_connection_create_spec_for_modal_dialog(MirConnection* connection,
74 int width, int height,75 int width, int height,
75 MirPixelFormat format,76 MirPixelFormat format,
76 MirSurface* parent)77 MirSurface* parent)
77__attribute__((deprecated("Use mir_create_modal_dialog_window_spec() instead")));78MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_modal_dialog_window_spec() instead");
7879
79MirSurfaceSpec*80MirSurfaceSpec*
80mir_connection_create_spec_for_dialog(MirConnection* connection,81mir_connection_create_spec_for_dialog(MirConnection* connection,
81 int width, int height,82 int width, int height,
82 MirPixelFormat format)83 MirPixelFormat format)
83__attribute__((deprecated("Use mir_create_dialog_window_spec() instead")));84MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_dialog_window_spec() instead");
8485
85MirSurfaceSpec* mir_create_surface_spec(MirConnection* connection)86MirSurfaceSpec* mir_create_surface_spec(MirConnection* connection)
86__attribute__((deprecated("Use mir_create_window_spec() instead")));87MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_window_spec() instead");
8788
88MirSurfaceSpec*89MirSurfaceSpec*
89mir_connection_create_spec_for_changes(MirConnection* connection)90mir_connection_create_spec_for_changes(MirConnection* connection)
90__attribute__((deprecated("Use mir_create_window_spec() instead")));91MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_window_spec() instead");
9192
92void mir_surface_spec_set_parent(MirSurfaceSpec* spec, MirSurface* parent)93void mir_surface_spec_set_parent(MirSurfaceSpec* spec, MirSurface* parent)
93__attribute__((deprecated("Use mir_window_spec_set_parent() instead")));94MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_parent() instead");
9495
95/**96/**
96 *\deprecated This will soon be a property of the backing content.97 *\deprecated This will soon be a property of the backing content.
@@ -103,77 +104,77 @@
103 * was removed by use of mir_window_spec_set_streams().104 * was removed by use of mir_window_spec_set_streams().
104 */105 */
105int mir_surface_get_swapinterval(MirSurface* surface)106int mir_surface_get_swapinterval(MirSurface* surface)
106__attribute__((deprecated("This will soon be a property of the backing content")));107MIR_FOR_REMOVAL_IN_VERSION_1("This will soon be a property of the backing content");
107108
108void mir_surface_spec_set_type(MirSurfaceSpec* spec, MirSurfaceType type)109void mir_surface_spec_set_type(MirSurfaceSpec* spec, MirSurfaceType type)
109__attribute__((deprecated("use mir_window_spec_set_type() instead")));110MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_type() instead");
110111
111void mir_surface_spec_set_name(MirSurfaceSpec* spec, char const* name)112void mir_surface_spec_set_name(MirSurfaceSpec* spec, char const* name)
112__attribute__((deprecated("use mir_window_spec_set_name() instead")));113MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_name() instead");
113114
114void mir_surface_spec_set_width(MirSurfaceSpec* spec, unsigned width)115void mir_surface_spec_set_width(MirSurfaceSpec* spec, unsigned width)
115__attribute__((deprecated("use mir_window_spec_set_width() instead")));116MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_width() instead");
116117
117void mir_surface_spec_set_height(MirSurfaceSpec* spec, unsigned height)118void mir_surface_spec_set_height(MirSurfaceSpec* spec, unsigned height)
118__attribute__((deprecated("use mir_window_spec_set_height() instead")));119MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_height() instead");
119120
120void mir_surface_spec_set_width_increment(MirSurfaceSpec* spec, unsigned width_inc)121void mir_surface_spec_set_width_increment(MirSurfaceSpec* spec, unsigned width_inc)
121__attribute__((deprecated("use mir_window_spec_set_width_increment() instead")));122MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_width_increment() instead");
122123
123void mir_surface_spec_set_height_increment(MirSurfaceSpec* spec, unsigned height_inc)124void mir_surface_spec_set_height_increment(MirSurfaceSpec* spec, unsigned height_inc)
124__attribute__((deprecated("use mir_window_spec_set_height_increment() instead")));125MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_height_increment() instead");
125126
126void mir_surface_spec_set_min_width(MirSurfaceSpec* spec, unsigned min_width)127void mir_surface_spec_set_min_width(MirSurfaceSpec* spec, unsigned min_width)
127__attribute__((deprecated("use mir_window_spec_set_min_width() instead")));128MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_width() instead");
128129
129void mir_surface_spec_set_min_height(MirSurfaceSpec* spec, unsigned min_height)130void mir_surface_spec_set_min_height(MirSurfaceSpec* spec, unsigned min_height)
130__attribute__((deprecated("use mir_window_spec_set_min_height() instead")));131MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_height() instead");
131132
132void mir_surface_spec_set_max_width(MirSurfaceSpec* spec, unsigned max_width)133void mir_surface_spec_set_max_width(MirSurfaceSpec* spec, unsigned max_width)
133__attribute__((deprecated("use mir_window_spec_set_max_width() instead")));134MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_width() instead");
134135
135void mir_surface_spec_set_max_height(MirSurfaceSpec* spec, unsigned max_height)136void mir_surface_spec_set_max_height(MirSurfaceSpec* spec, unsigned max_height)
136__attribute__((deprecated("use mir_window_spec_set_max_height() instead")));137MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_height() instead");
137138
138void mir_surface_spec_set_min_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)139void mir_surface_spec_set_min_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)
139__attribute__((deprecated("use mir_window_spec_set_min_aspect_ratio() instead")));140MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_aspect_ratio() instead");
140141
141void mir_surface_spec_set_max_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)142void mir_surface_spec_set_max_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height)
142__attribute__((deprecated("use mir_window_spec_set_max_aspect_ratio() instead")));143MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_aspect_ratio() instead");
143144
144void mir_surface_spec_set_fullscreen_on_output(MirSurfaceSpec* spec, uint32_t output_id)145void mir_surface_spec_set_fullscreen_on_output(MirSurfaceSpec* spec, uint32_t output_id)
145__attribute__((deprecated("use mir_window_spec_set_fullscreen_on_output() instead")));146MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_fullscreen_on_output() instead");
146147
147void mir_surface_spec_set_preferred_orientation(MirSurfaceSpec* spec, MirOrientationMode mode)148void mir_surface_spec_set_preferred_orientation(MirSurfaceSpec* spec, MirOrientationMode mode)
148__attribute__((deprecated("use mir_window_spec_set_preferred_orientation() instead")));149MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_preferred_orientation() instead");
149150
150bool mir_surface_spec_attach_to_foreign_parent(MirSurfaceSpec* spec,151bool mir_surface_spec_attach_to_foreign_parent(MirSurfaceSpec* spec,
151 MirPersistentId* parent,152 MirPersistentId* parent,
152 MirRectangle* attachment_rect,153 MirRectangle* attachment_rect,
153 MirEdgeAttachment edge)154 MirEdgeAttachment edge)
154__attribute__((deprecated("use mir_window_spec_attach_to_foreign_parent() instead")));155MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_attach_to_foreign_parent() instead");
155156
156void mir_surface_spec_set_state(MirSurfaceSpec* spec, MirSurfaceState state)157void mir_surface_spec_set_state(MirSurfaceSpec* spec, MirSurfaceState state)
157__attribute__((deprecated("use mir_window_spec_set_state() instead")));158MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_state() instead");
158159
159void mir_surface_spec_release(MirSurfaceSpec* spec)160void mir_surface_spec_release(MirSurfaceSpec* spec)
160__attribute__((deprecated("use mir_window_spec_release() instead")));161MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_release() instead");
161162
162void mir_surface_spec_set_input_shape(MirSurfaceSpec* spec,163void mir_surface_spec_set_input_shape(MirSurfaceSpec* spec,
163 MirRectangle const *rectangles,164 MirRectangle const *rectangles,
164 size_t n_rects)165 size_t n_rects)
165__attribute__((deprecated("use mir_window_spec_set_input_shape() instead")));166MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_input_shape() instead");
166167
167void mir_surface_spec_set_event_handler(MirSurfaceSpec* spec,168void mir_surface_spec_set_event_handler(MirSurfaceSpec* spec,
168 mir_surface_event_callback callback,169 mir_surface_event_callback callback,
169 void* context)170 void* context)
170__attribute__((deprecated("use mir_window_spec_set_event_handler() instead")));171MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_event_handler() instead");
171172
172void mir_surface_spec_set_shell_chrome(MirSurfaceSpec* spec, MirShellChrome style)173void mir_surface_spec_set_shell_chrome(MirSurfaceSpec* spec, MirShellChrome style)
173__attribute__((deprecated("use mir_window_spec_set_shell_chrome() instead")));174MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_shell_chrome() instead");
174175
175void mir_surface_spec_set_pointer_confinement(MirSurfaceSpec* spec, MirPointerConfinementState state)176void mir_surface_spec_set_pointer_confinement(MirSurfaceSpec* spec, MirPointerConfinementState state)
176__attribute__((deprecated("use mir_window_spec_set_pointer_confinement() instead")));177MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_pointer_confinement() instead");
177178
178void mir_surface_spec_set_placement(MirSurfaceSpec* spec,179void mir_surface_spec_set_placement(MirSurfaceSpec* spec,
179 const MirRectangle* rect,180 const MirRectangle* rect,
@@ -182,69 +183,69 @@
182 MirPlacementHints placement_hints,183 MirPlacementHints placement_hints,
183 int offset_dx,184 int offset_dx,
184 int offset_dy)185 int offset_dy)
185__attribute__((deprecated("use mir_window_spec_set_placement() instead")));186MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_placement() instead");
186187
187MirSurfaceSpec* mir_connection_create_spec_for_input_method(MirConnection* connection,188MirSurfaceSpec* mir_connection_create_spec_for_input_method(MirConnection* connection,
188 int width, int height,189 int width, int height,
189 MirPixelFormat format)190 MirPixelFormat format)
190__attribute__((deprecated("use mir_create_input_method_window_spec() instead")));191MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_input_method_window_spec() instead");
191192
192void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format)193void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format)
193__attribute__((deprecated("use mir_window_spec_set_pixel_format() instead")));194MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_pixel_format() instead");
194195
195void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage)196void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage)
196__attribute__((deprecated("use mir_window_spec_set_buffer_usage() instead")));197MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_buffer_usage() instead");
197198
198void mir_surface_spec_set_streams(MirSurfaceSpec* spec,199void mir_surface_spec_set_streams(MirSurfaceSpec* spec,
199 MirBufferStreamInfo* streams,200 MirBufferStreamInfo* streams,
200 unsigned int num_streams)201 unsigned int num_streams)
201__attribute__((deprecated("use mir_window_spec_set_streams() instead")));202MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_streams() instead");
202203
203void mir_surface_apply_spec(MirSurface* surface, MirSurfaceSpec* spec)204void mir_surface_apply_spec(MirSurface* surface, MirSurfaceSpec* spec)
204__attribute__((deprecated("use mir_window_apply_spec() instead")));205MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_apply_spec() instead");
205206
206bool mir_surface_is_valid(MirSurface *surface)207bool mir_surface_is_valid(MirSurface *surface)
207__attribute__((deprecated("use mir_window_is_valid() instead")));208MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_is_valid() instead");
208209
209MirWaitHandle* mir_surface_create(MirSurfaceSpec* requested_specification,210MirWaitHandle* mir_surface_create(MirSurfaceSpec* requested_specification,
210 mir_surface_callback callback, void* context)211 mir_surface_callback callback, void* context)
211__attribute__((deprecated("use mir_create_window() instead")));212MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_window() instead");
212213
213MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification)214MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification)
214__attribute__((deprecated("use mir_create_window_sync() instead")));215MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_window_sync() instead");
215216
216MirWaitHandle *mir_surface_release(217MirWaitHandle *mir_surface_release(
217 MirSurface *surface,218 MirSurface *surface,
218 mir_surface_callback callback,219 mir_surface_callback callback,
219 void *context)220 void *context)
220__attribute__((deprecated("use mir_window_release() instead")));221MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_release() instead");
221222
222void mir_surface_release_sync(MirSurface *surface)223void mir_surface_release_sync(MirSurface *surface)
223__attribute__((deprecated("use mir_window_release_sync() instead")));224MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_release_sync() instead");
224225
225void mir_surface_set_event_handler(MirSurface *surface,226void mir_surface_set_event_handler(MirSurface *surface,
226 mir_surface_event_callback callback,227 mir_surface_event_callback callback,
227 void* context)228 void* context)
228__attribute__((deprecated("use mir_window_set_event_handler() instead")));229MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_event_handler() instead");
229230
230MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface)231MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface)
231__attribute__((deprecated("use mir_window_get_buffer_stream() instead")));232MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_buffer_stream() instead");
232233
233char const* mir_surface_get_error_message(MirSurface *surface)234char const* mir_surface_get_error_message(MirSurface *surface)
234__attribute__((deprecated("use mir_window_get_error_message() instead")));235MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_error_message() instead");
235236
236void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters)237void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters)
237__attribute__((deprecated("use mir_window_get_parameters() instead")));238MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_parameters() instead");
238239
239MirSurfaceType mir_surface_get_type(MirSurface* surface)240MirSurfaceType mir_surface_get_type(MirSurface* surface)
240__attribute__((deprecated("use mir_window_get_type() instead")));241MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_type() instead");
241242
242MirWaitHandle* mir_surface_set_state(MirSurface *surface,243MirWaitHandle* mir_surface_set_state(MirSurface *surface,
243 MirSurfaceState state)244 MirSurfaceState state)
244__attribute__((deprecated("use mir_window_set_state() instead")));245MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_state() instead");
245246
246MirSurfaceState mir_surface_get_state(MirSurface *surface)247MirSurfaceState mir_surface_get_state(MirSurface *surface)
247__attribute__((deprecated("use mir_window_get_state() instead")));248MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_state() instead");
248249
249/**250/**
250 * Set the swapinterval for the default stream.251 * Set the swapinterval for the default stream.
@@ -260,37 +261,37 @@
260 * or NULL if the interval could not be supported261 * or NULL if the interval could not be supported
261 */262 */
262MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval)263MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval)
263__attribute__((deprecated("Swap interval should be set on the backing content")));264MIR_FOR_REMOVAL_IN_VERSION_1("Swap interval should be set on the backing content");
264265
265int mir_surface_get_dpi(MirSurface* surface)266int mir_surface_get_dpi(MirSurface* surface)
266__attribute__((deprecated("use mir_window_get_dpi() instead")));267MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_dpi() instead");
267268
268MirSurfaceFocusState mir_surface_get_focus(MirSurface *surface)269MirSurfaceFocusState mir_surface_get_focus(MirSurface *surface)
269__attribute__((deprecated("use mir_window_get_focus_state() instead")));270MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_focus_state() instead");
270271
271MirSurfaceVisibility mir_surface_get_visibility(MirSurface *surface)272MirSurfaceVisibility mir_surface_get_visibility(MirSurface *surface)
272__attribute__((deprecated("use mir_window_get_visibility() instead")));273MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_visibility() instead");
273274
274MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters)275MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters)
275__attribute__((deprecated("use mir_window_configure_cursor() instead")));276MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_configure_cursor() instead");
276277
277MirOrientation mir_surface_get_orientation(MirSurface *surface)278MirOrientation mir_surface_get_orientation(MirSurface *surface)
278__attribute__((deprecated("use mir_window_get_orientation() instead")));279MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_orientation() instead");
279280
280MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation)281MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation)
281__attribute__((deprecated("use mir_window_set_preferred_orientation() instead")));282MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_preferred_orientation() instead");
282283
283MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surface)284MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surface)
284__attribute__((deprecated("use mir_window_get_preferred_orientation() instead")));285MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_preferred_orientation() instead");
285286
286MirWaitHandle* mir_surface_request_persistent_id(MirSurface* surface, mir_surface_id_callback callback, void* context)287MirWaitHandle* mir_surface_request_persistent_id(MirSurface* surface, mir_surface_id_callback callback, void* context)
287__attribute__((deprecated("use mir_window_request_persistent_id() instead")));288MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_request_persistent_id() instead");
288289
289MirPersistentId* mir_surface_request_persistent_id_sync(MirSurface *surface)290MirPersistentId* mir_surface_request_persistent_id_sync(MirSurface *surface)
290__attribute__((deprecated("use mir_window_request_persistent_id_sync() instead")));291MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_request_persistent_id_sync() instead");
291292
292void mir_surface_raise(MirSurface* surface, MirCookie const* cookie)293void mir_surface_raise(MirSurface* surface, MirCookie const* cookie)
293__attribute__((deprecated("use mir_window_raise() instead")));294MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_raise() instead");
294295
295#pragma GCC diagnostic pop296#pragma GCC diagnostic pop
296297
297298
=== modified file 'include/client/mir_toolkit/mir_wait.h'
--- include/client/mir_toolkit/mir_wait.h 2017-01-19 23:17:56 +0000
+++ include/client/mir_toolkit/mir_wait.h 2017-06-05 10:39:04 +0000
@@ -19,6 +19,7 @@
19#define MIR_TOOLKIT_MIR_WAIT_H_19#define MIR_TOOLKIT_MIR_WAIT_H_
2020
21#include <mir_toolkit/client_types.h>21#include <mir_toolkit/client_types.h>
22#include <mir_toolkit/deprecations.h>
2223
23#ifdef __cplusplus24#ifdef __cplusplus
24/**25/**
@@ -36,7 +37,7 @@
36 * \param [in] wait_handle Handle returned by an asynchronous request37 * \param [in] wait_handle Handle returned by an asynchronous request
37 */38 */
38void mir_wait_for(MirWaitHandle *wait_handle)39void mir_wait_for(MirWaitHandle *wait_handle)
39__attribute__ ((deprecated("No longer supported - use callbacks or wait for state changes")));40MIR_FOR_REMOVAL_IN_VERSION_1("No longer supported - use callbacks or wait for state changes");
4041
41/**42/**
42 * Wait on the supplied handle until one instance of the associated request43 * Wait on the supplied handle until one instance of the associated request
@@ -47,7 +48,7 @@
47 * \param [in] wait_handle Handle returned by an asynchronous request48 * \param [in] wait_handle Handle returned by an asynchronous request
48 */49 */
49void mir_wait_for_one(MirWaitHandle *wait_handle)50void mir_wait_for_one(MirWaitHandle *wait_handle)
50__attribute__ ((deprecated("No longer supported - use callbacks or wait for state changes")));51MIR_FOR_REMOVAL_IN_VERSION_1("No longer supported - use callbacks or wait for state changes");
5152
5253
53#ifdef __cplusplus54#ifdef __cplusplus
5455
=== modified file 'include/client/mir_toolkit/mir_window.h'
--- include/client/mir_toolkit/mir_window.h 2017-02-03 20:39:06 +0000
+++ include/client/mir_toolkit/mir_window.h 2017-06-05 10:39:04 +0000
@@ -22,6 +22,7 @@
22#include <mir_toolkit/client_types.h>22#include <mir_toolkit/client_types.h>
23#include <mir_toolkit/common.h>23#include <mir_toolkit/common.h>
24#include <mir_toolkit/mir_cursor_configuration.h>24#include <mir_toolkit/mir_cursor_configuration.h>
25#include <mir_toolkit/deprecations.h>
2526
26#include <stdbool.h>27#include <stdbool.h>
2728
@@ -555,7 +556,7 @@
555 MirRenderSurface* render_surface,556 MirRenderSurface* render_surface,
556 int logical_width, int logical_height,557 int logical_width, int logical_height,
557 int displacement_x, int displacement_y)558 int displacement_x, int displacement_y)
558__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));559MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition");
559#pragma GCC diagnostic pop560#pragma GCC diagnostic pop
560561
561/**562/**
@@ -774,7 +775,7 @@
774 * \param [in,out] context User data passed to completion callback.775 * \param [in,out] context User data passed to completion callback.
775 */776 */
776void mir_window_request_persistent_id(MirWindow* window, MirWindowIdCallback callback, void* context)777void mir_window_request_persistent_id(MirWindow* window, MirWindowIdCallback callback, void* context)
777__attribute__((deprecated("Use mir_window_request_window_id() instead")));778MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_request_window_id() instead");
778void mir_window_request_window_id(MirWindow* window, MirWindowIdCallback callback, void* context);779void mir_window_request_window_id(MirWindow* window, MirWindowIdCallback callback, void* context);
779780
780/**781/**
@@ -784,7 +785,7 @@
784 * be freed with a call to mir_persistent_id_release()785 * be freed with a call to mir_persistent_id_release()
785 */786 */
786MirPersistentId* mir_window_request_persistent_id_sync(MirWindow* window)787MirPersistentId* mir_window_request_persistent_id_sync(MirWindow* window)
787__attribute__((deprecated("Use mir_window_request_window_id_sync")));788MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_request_window_id_sync");
788MirWindowId* mir_window_request_window_id_sync(MirWindow* window);789MirWindowId* mir_window_request_window_id_sync(MirWindow* window);
789#ifdef __cplusplus790#ifdef __cplusplus
790}791}
791792
=== modified file 'include/client/mir_toolkit/rs/mir_render_surface.h'
--- include/client/mir_toolkit/rs/mir_render_surface.h 2017-03-16 16:47:21 +0000
+++ include/client/mir_toolkit/rs/mir_render_surface.h 2017-06-05 10:39:04 +0000
@@ -21,6 +21,18 @@
21#define MIR_TOOLKIT_MIR_RENDER_SURFACE_H_21#define MIR_TOOLKIT_MIR_RENDER_SURFACE_H_
2222
23#include <mir_toolkit/client_types.h>23#include <mir_toolkit/client_types.h>
24#include <mir_toolkit/deprecations.h>
25
26#ifndef MIR_DEPRECATE_RENDERSURFACES
27 #define MIR_DEPRECATE_RENDERSURFACES 0
28#endif
29
30#if MIR_ENABLE_DEPRECATIONS > 0 && MIR_DEPRECATE_RENDERSURFACES > 0
31 #define MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME\
32 __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")))
33#else
34 #define MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
35#endif
2436
25#ifdef __cplusplus37#ifdef __cplusplus
26/**38/**
@@ -30,6 +42,9 @@
30extern "C" {42extern "C" {
31#endif43#endif
3244
45typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context)
46MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
47
33#pragma GCC diagnostic push48#pragma GCC diagnostic push
34#pragma GCC diagnostic ignored "-Wdeprecated-declarations"49#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
35/**50/**
@@ -49,7 +64,7 @@
49 int width, int height,64 int width, int height,
50 MirRenderSurfaceCallback callback,65 MirRenderSurfaceCallback callback,
51 void* context)66 void* context)
52__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));67MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
5368
54/**69/**
55 * Create a render surface and wait for the result70 * Create a render surface and wait for the result
@@ -64,7 +79,7 @@
64MirRenderSurface* mir_connection_create_render_surface_sync(79MirRenderSurface* mir_connection_create_render_surface_sync(
65 MirConnection* connection,80 MirConnection* connection,
66 int width, int height)81 int width, int height)
67__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));82MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
6883
69/**84/**
70 * Get the size of the MirRenderSurface85 * Get the size of the MirRenderSurface
@@ -76,7 +91,7 @@
76void mir_render_surface_get_size(91void mir_render_surface_get_size(
77 MirRenderSurface* render_surface,92 MirRenderSurface* render_surface,
78 int* width, int* height)93 int* width, int* height)
79__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));94MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
8095
81/**96/**
82 * Set the size of the MirRenderSurface97 * Set the size of the MirRenderSurface
@@ -88,7 +103,7 @@
88void mir_render_surface_set_size(103void mir_render_surface_set_size(
89 MirRenderSurface* render_surface,104 MirRenderSurface* render_surface,
90 int width, int height)105 int width, int height)
91__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));106MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
92107
93/**108/**
94 * Test for a valid render surface109 * Test for a valid render surface
@@ -100,8 +115,7 @@
100 */115 */
101bool mir_render_surface_is_valid(116bool mir_render_surface_is_valid(
102 MirRenderSurface* render_surface)117 MirRenderSurface* render_surface)
103__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));118MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
104
105/**119/**
106 * Retrieve a text description of the error. The returned string is owned by120 * Retrieve a text description of the error. The returned string is owned by
107 * the library and remains valid until the render surface or the associated121 * the library and remains valid until the render surface or the associated
@@ -113,7 +127,7 @@
113 */127 */
114char const *mir_render_surface_get_error_message(128char const *mir_render_surface_get_error_message(
115 MirRenderSurface* render_surface)129 MirRenderSurface* render_surface)
116__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));130MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
117131
118/**132/**
119 * Release the specified render surface133 * Release the specified render surface
@@ -122,7 +136,7 @@
122 */136 */
123void mir_render_surface_release(137void mir_render_surface_release(
124 MirRenderSurface* render_surface)138 MirRenderSurface* render_surface)
125__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));139MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
126140
127/**141/**
128 * Obtain the buffer stream backing a given render surface.142 * Obtain the buffer stream backing a given render surface.
@@ -142,7 +156,7 @@
142 MirRenderSurface* render_surface,156 MirRenderSurface* render_surface,
143 int width, int height,157 int width, int height,
144 MirPixelFormat format)158 MirPixelFormat format)
145__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));159MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
146160
147/**161/**
148 * Obtain the presentation chain backing a given render surface.162 * Obtain the presentation chain backing a given render surface.
@@ -155,7 +169,7 @@
155 */169 */
156MirPresentationChain* mir_render_surface_get_presentation_chain(170MirPresentationChain* mir_render_surface_get_presentation_chain(
157 MirRenderSurface* render_surface)171 MirRenderSurface* render_surface)
158__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));172MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
159173
160/** Query whether the server supports a given presentation mode.174/** Query whether the server supports a given presentation mode.
161 *175 *
@@ -189,7 +203,29 @@
189 MirWindowSpec* spec,203 MirWindowSpec* spec,
190 MirRenderSurface* render_surface,204 MirRenderSurface* render_surface,
191 int hotspot_x, int hotspot_y)205 int hotspot_x, int hotspot_y)
192__attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")));206MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
207
208/**
209 * Set the MirWindowSpec to display content contained in a render surface
210 *
211 * \warning: The initial call to mir_window_spec_add_render_surface will set
212 * the bottom-most content, and subsequent calls will stack the
213 * content on top.
214 *
215 * \param spec The window_spec to be updated
216 * \param render_surface The render surface containing the content to be displayed
217 * \param logical_width The width that the content will be displayed at
218 * (Ignored for buffer streams)
219 * \param logical_height The height that the content will be displayed at
220 * (Ignored for buffer streams)
221 * \param displacement_x The x displacement from the top-left corner of the MirWindow
222 * \param displacement_y The y displacement from the top-left corner of the MirWindow
223 */
224void mir_window_spec_add_render_surface(MirWindowSpec* spec,
225 MirRenderSurface* render_surface,
226 int logical_width, int logical_height,
227 int displacement_x, int displacement_y)
228MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME;
193229
194#pragma GCC diagnostic pop230#pragma GCC diagnostic pop
195231
196232
=== modified file 'include/core/mir_toolkit/common.h'
--- include/core/mir_toolkit/common.h 2017-01-23 22:29:00 +0000
+++ include/core/mir_toolkit/common.h 2017-06-05 10:39:04 +0000
@@ -21,6 +21,8 @@
21#ifndef MIR_COMMON_H_21#ifndef MIR_COMMON_H_
22#define MIR_COMMON_H_22#define MIR_COMMON_H_
2323
24#include <mir_toolkit/deprecations.h>
25
24//for clang26//for clang
25#ifndef __has_feature27#ifndef __has_feature
26 #define __has_feature(x) 0 // Compatibility with non-clang28 #define __has_feature(x) 0 // Compatibility with non-clang
@@ -35,7 +37,7 @@
35 (__has_extension(attribute_deprecated_with_message) && \37 (__has_extension(attribute_deprecated_with_message) && \
36 __has_extension(enumerator_attributes))38 __has_extension(enumerator_attributes))
37 #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \39 #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \
38 ENUM __attribute__ ((deprecated("Use " #INSTEAD " instead")))40 ENUM MIR_FOR_REMOVAL_IN_VERSION_1("Use " #INSTEAD " instead")
39#else41#else
40 #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \42 #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \
41 ENUM43 ENUM
@@ -65,7 +67,7 @@
65 mir_surface_attrib_preferred_orientation,67 mir_surface_attrib_preferred_orientation,
66 /* Must be last */68 /* Must be last */
67 mir_surface_attribs69 mir_surface_attribs
68} MirSurfaceAttrib __attribute__ ((deprecated("use MirWindowAttrib")));70} MirSurfaceAttrib MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowAttrib");
6971
70/**72/**
71 * Attributes of a window that the client and server/shell may wish to73 * Attributes of a window that the client and server/shell may wish to
@@ -102,7 +104,7 @@
102 mir_surface_type_satellite, /**< AKA "toolbox"/"toolbar" */104 mir_surface_type_satellite, /**< AKA "toolbox"/"toolbar" */
103 mir_surface_type_tip, /**< AKA "tooltip" */105 mir_surface_type_tip, /**< AKA "tooltip" */
104 mir_surface_types106 mir_surface_types
105} MirSurfaceType __attribute__ ((deprecated("use MirWindowType")));107} MirSurfaceType MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowType");
106108
107typedef enum MirWindowType109typedef enum MirWindowType
108{110{
@@ -132,7 +134,7 @@
132 mir_surface_state_horizmaximized,134 mir_surface_state_horizmaximized,
133 mir_surface_state_hidden,135 mir_surface_state_hidden,
134 mir_surface_states136 mir_surface_states
135} MirSurfaceState __attribute__ ((deprecated("use MirWindowState")));137} MirSurfaceState MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowState");
136138
137typedef enum MirWindowState139typedef enum MirWindowState
138{140{
@@ -154,7 +156,7 @@
154{156{
155 mir_surface_unfocused = 0,157 mir_surface_unfocused = 0,
156 mir_surface_focused158 mir_surface_focused
157} MirSurfaceFocusState __attribute__ ((deprecated("use MirWindowFocusState")));159} MirSurfaceFocusState MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowFocusState");
158160
159typedef enum MirWindowFocusState161typedef enum MirWindowFocusState
160{162{
@@ -166,7 +168,7 @@
166{168{
167 mir_surface_visibility_occluded = 0,169 mir_surface_visibility_occluded = 0,
168 mir_surface_visibility_exposed170 mir_surface_visibility_exposed
169} MirSurfaceVisibility __attribute__ ((deprecated("use MirWindowFocusState")));171} MirSurfaceVisibility MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowFocusState");
170172
171typedef enum MirWindowVisibility173typedef enum MirWindowVisibility
172{174{
173175
=== added file 'include/core/mir_toolkit/deprecations.h'
--- include/core/mir_toolkit/deprecations.h 1970-01-01 00:00:00 +0000
+++ include/core/mir_toolkit/deprecations.h 2017-06-05 10:39:04 +0000
@@ -0,0 +1,36 @@
1/*
2 * Copyright © 2017 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef MIR_DEPRECATIONS_H_
18#define MIR_DEPRECATIONS_H_
19
20#ifndef MIR_ENABLE_DEPRECATIONS
21 // use g++ version < 6.2 as a proxy for building on Ubunutu 16.04LTS ("Xenial") or 16.10 (Yakkety)
22 #if defined(__clang__) || !defined(__GNUC__) || (__GNUC__ > 6) || ((__GNUC__ == 6) && (__GNUC_MINOR__ >= 2))
23 #define MIR_ENABLE_DEPRECATIONS 1
24 #else
25 #define MIR_ENABLE_DEPRECATIONS 0
26 #endif
27#endif
28
29#if MIR_ENABLE_DEPRECATIONS > 0
30 #define MIR_FOR_REMOVAL_IN_VERSION_1(message)\
31 __attribute__((deprecated(message)))
32#else
33 #define MIR_FOR_REMOVAL_IN_VERSION_1(message)
34#endif
35
36#endif //MIR_DEPRECATIONS_H_
037
=== modified file 'src/common/events/input_configuration_event.cpp'
--- src/common/events/input_configuration_event.cpp 2017-01-20 16:27:50 +0000
+++ src/common/events/input_configuration_event.cpp 2017-06-05 10:39:04 +0000
@@ -18,13 +18,12 @@
1818
19#include "mir/events/input_configuration_event.h"19#include "mir/events/input_configuration_event.h"
2020
21#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
21MirInputConfigurationEvent::MirInputConfigurationEvent()22MirInputConfigurationEvent::MirInputConfigurationEvent()
22{23{
23 event.initInputConfiguration();24 event.initInputConfiguration();
24}25}
2526
26#pragma GCC diagnostic push
27#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
28MirInputConfigurationAction MirInputConfigurationEvent::action() const27MirInputConfigurationAction MirInputConfigurationEvent::action() const
29{28{
30 return static_cast<MirInputConfigurationAction>(event.asReader().getInputConfiguration().getAction());29 return static_cast<MirInputConfigurationAction>(event.asReader().getInputConfiguration().getAction());
@@ -34,7 +33,6 @@
34{33{
35 event.getInputConfiguration().setAction(static_cast<mir::capnp::InputConfigurationEvent::Action>(action));34 event.getInputConfiguration().setAction(static_cast<mir::capnp::InputConfigurationEvent::Action>(action));
36}35}
37#pragma GCC diagnostic pop
3836
39std::chrono::nanoseconds MirInputConfigurationEvent::when() const37std::chrono::nanoseconds MirInputConfigurationEvent::when() const
40{38{
4139
=== modified file 'src/include/common/mir/events/input_configuration_event.h'
--- src/include/common/mir/events/input_configuration_event.h 2017-01-20 16:27:50 +0000
+++ src/include/common/mir/events/input_configuration_event.h 2017-06-05 10:39:04 +0000
@@ -37,8 +37,7 @@
3737
38 MirInputDeviceId id() const;38 MirInputDeviceId id() const;
39 void set_id(MirInputDeviceId id);39 void set_id(MirInputDeviceId id);
40}40};
41 __attribute__((deprecated));
42#pragma GCC diagnostic pop41#pragma GCC diagnostic pop
4342
44#endif /* MIR_COMMON_INPUT_CONFIGURATION_EVENT_H_ */43#endif /* MIR_COMMON_INPUT_CONFIGURATION_EVENT_H_ */
4544
=== modified file 'src/platforms/android/utils/CMakeLists.txt'
--- src/platforms/android/utils/CMakeLists.txt 2017-01-18 02:29:37 +0000
+++ src/platforms/android/utils/CMakeLists.txt 2017-06-05 10:39:04 +0000
@@ -36,6 +36,7 @@
36)36)
3737
38target_link_libraries(mir_demo_standalone_render_overlays38target_link_libraries(mir_demo_standalone_render_overlays
39 mirclient
39 mircommon40 mircommon
40 mirplatform41 mirplatform
41)42)
4243
=== modified file 'src/platforms/mesa/server/kms/kms_page_flipper.cpp'
--- src/platforms/mesa/server/kms/kms_page_flipper.cpp 2017-01-18 02:29:37 +0000
+++ src/platforms/mesa/server/kms/kms_page_flipper.cpp 2017-06-05 10:39:04 +0000
@@ -26,6 +26,7 @@
26#include <xf86drm.h>26#include <xf86drm.h>
27#include <xf86drmMode.h>27#include <xf86drmMode.h>
28#include <chrono>28#include <chrono>
29#include <cstring>
2930
30namespace mg = mir::graphics;31namespace mg = mir::graphics;
31namespace mgm = mir::graphics::mesa;32namespace mgm = mir::graphics::mesa;
@@ -89,12 +90,11 @@
8990
90mg::Frame mgm::KMSPageFlipper::wait_for_flip(uint32_t crtc_id)91mg::Frame mgm::KMSPageFlipper::wait_for_flip(uint32_t crtc_id)
91{92{
92 static drmEventContext evctx =93 drmEventContext evctx;
93 {94 memset(&evctx, 0, sizeof evctx);
94 DRM_EVENT_CONTEXT_VERSION, /* .version */95 evctx.version = 2; // We only support the old v2 page_flip_handler
95 0, /* .vblank_handler */96 evctx.page_flip_handler = &page_flip_handler;
96 page_flip_handler /* .page_flip_handler */97
97 };
98 static std::thread::id const invalid_tid;98 static std::thread::id const invalid_tid;
9999
100 {100 {
101101
=== modified file 'src/server/input/default_configuration.cpp'
--- src/server/input/default_configuration.cpp 2017-01-18 02:29:37 +0000
+++ src/server/input/default_configuration.cpp 2017-06-05 10:39:04 +0000
@@ -186,7 +186,9 @@
186 std::chrono::milliseconds const key_repeat_delay{50};186 std::chrono::milliseconds const key_repeat_delay{50};
187187
188 auto const options = the_options();188 auto const options = the_options();
189 auto enable_repeat = options->get<bool>(options::enable_key_repeat_opt);189 // lp:1675357: Disable generation of key repeat events on nested servers
190 auto enable_repeat = options->get<bool>(options::enable_key_repeat_opt) &&
191 !options->is_set(options::host_socket_opt);
190192
191 return std::make_shared<mi::KeyRepeatDispatcher>(193 return std::make_shared<mi::KeyRepeatDispatcher>(
192 the_event_filter_chain_dispatcher(), the_main_loop(), the_cookie_authority(),194 the_event_filter_chain_dispatcher(), the_main_loop(), the_cookie_authority(),
@@ -365,7 +367,9 @@
365 the_key_mapper(),367 the_key_mapper(),
366 the_server_status_listener());368 the_server_status_listener());
367369
368 if (key_repeater && !the_options()->is_set(options::host_socket_opt))370 // lp:1675357: KeyRepeatDispatcher must be informed about removed input devices, otherwise
371 // pressed keys get repeated indefinitely
372 if (key_repeater)
369 key_repeater->set_input_device_hub(hub);373 key_repeater->set_input_device_hub(hub);
370 return hub;374 return hub;
371 });375 });
372376
=== modified file 'src/server/input/default_device.cpp'
--- src/server/input/default_device.cpp 2017-01-18 02:29:37 +0000
+++ src/server/input/default_device.cpp 2017-06-05 10:39:04 +0000
@@ -30,10 +30,17 @@
3030
31namespace mi = mir::input;31namespace mi = mir::input;
3232
33mi::DefaultDevice::DefaultDevice(MirInputDeviceId id, std::shared_ptr<dispatch::ActionQueue> const& actions,33mi::DefaultDevice::DefaultDevice(MirInputDeviceId id,
34 InputDevice& device, std::shared_ptr<KeyMapper> const& key_mapper)34 std::shared_ptr<dispatch::ActionQueue> const& actions,
35 : device_id{id}, device{device}, info(device.get_device_info()), pointer{device.get_pointer_settings()},35 InputDevice& device,
36 touchpad{device.get_touchpad_settings()}, actions{actions}, key_mapper{key_mapper}36 std::shared_ptr<KeyMapper> const& key_mapper)
37 : device_id{id},
38 device{device},
39 info(device.get_device_info()),
40 pointer{device.get_pointer_settings()},
41 touchpad{device.get_touchpad_settings()},
42 actions{actions},
43 key_mapper{key_mapper}
37{44{
38 if (contains(info.capabilities, mi::DeviceCapability::keyboard))45 if (contains(info.capabilities, mi::DeviceCapability::keyboard))
39 {46 {
@@ -70,8 +77,8 @@
70 auto const& settings = pointer.value();77 auto const& settings = pointer.value();
7178
72 return MirPointerConfig(settings.handedness, settings.acceleration,79 return MirPointerConfig(settings.handedness, settings.acceleration,
73 settings.cursor_acceleration_bias, settings.horizontal_scroll_scale,80 settings.cursor_acceleration_bias, settings.horizontal_scroll_scale,
74 settings.vertical_scroll_scale);81 settings.vertical_scroll_scale);
75}82}
7683
77mir::optional_value<MirTouchpadConfig> mi::DefaultDevice::touchpad_configuration() const84mir::optional_value<MirTouchpadConfig> mi::DefaultDevice::touchpad_configuration() const
@@ -82,14 +89,17 @@
82 auto const& settings = touchpad.value();89 auto const& settings = touchpad.value();
8390
84 return MirTouchpadConfig(settings.click_mode, settings.scroll_mode, settings.button_down_scroll_button,91 return MirTouchpadConfig(settings.click_mode, settings.scroll_mode, settings.button_down_scroll_button,
85 settings.tap_to_click, settings.disable_while_typing, settings.disable_with_mouse,92 settings.tap_to_click, settings.disable_while_typing, settings.disable_with_mouse,
86 settings.middle_mouse_button_emulation);93 settings.middle_mouse_button_emulation);
87}94}
8895
89void mi::DefaultDevice::apply_pointer_configuration(MirPointerConfig const& conf)96void mi::DefaultDevice::apply_pointer_configuration(MirPointerConfig const& conf)
90{97{
91 if (!pointer.is_set())98 {
92 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a pointer configuration"));99 std::lock_guard<std::mutex> lock(config_mutex);
100 if (!pointer.is_set())
101 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a pointer configuration"));
102 }
93103
94 if (conf.cursor_acceleration_bias() < -1.0 || conf.cursor_acceleration_bias() > 1.0)104 if (conf.cursor_acceleration_bias() < -1.0 || conf.cursor_acceleration_bias() > 1.0)
95 BOOST_THROW_EXCEPTION(std::invalid_argument("Cursor acceleration bias out of range"));105 BOOST_THROW_EXCEPTION(std::invalid_argument("Cursor acceleration bias out of range"));
@@ -101,18 +111,25 @@
101 settings.vertical_scroll_scale = conf.vertical_scroll_scale();111 settings.vertical_scroll_scale = conf.vertical_scroll_scale();
102 settings.horizontal_scroll_scale = conf.horizontal_scroll_scale();112 settings.horizontal_scroll_scale = conf.horizontal_scroll_scale();
103113
104 pointer = settings;114 {
105115 std::lock_guard<std::mutex> lock(config_mutex);
106 actions->enqueue([settings = std::move(settings), dev=&device]116 pointer = settings;
107 {117 if (!actions) // device is disabled
108 dev->apply_settings(settings);118 return;
109 });119 actions->enqueue([settings = std::move(settings), dev=&device]
120 {
121 dev->apply_settings(settings);
122 });
123 }
110}124}
111125
112void mi::DefaultDevice::apply_touchpad_configuration(MirTouchpadConfig const& conf)126void mi::DefaultDevice::apply_touchpad_configuration(MirTouchpadConfig const& conf)
113{127{
114 if (!touchpad.is_set())128 {
115 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a touchpad configuration"));129 std::lock_guard<std::mutex> lock(config_mutex);
130 if (!touchpad.is_set())
131 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a touchpad configuration"));
132 }
116133
117 if (conf.scroll_mode() & mir_touchpad_scroll_mode_button_down_scroll &&134 if (conf.scroll_mode() & mir_touchpad_scroll_mode_button_down_scroll &&
118 conf.button_down_scroll_button() == mi::no_scroll_button)135 conf.button_down_scroll_button() == mi::no_scroll_button)
@@ -127,12 +144,17 @@
127 settings.tap_to_click = conf.tap_to_click();144 settings.tap_to_click = conf.tap_to_click();
128 settings.middle_mouse_button_emulation = conf.middle_mouse_button_emulation();145 settings.middle_mouse_button_emulation = conf.middle_mouse_button_emulation();
129146
130 touchpad = settings;147 {
148 std::lock_guard<std::mutex> lock(config_mutex);
149 touchpad = settings;
131150
132 actions->enqueue([settings = std::move(settings), dev=&device]151 if (!actions) // device is disabled
133 {152 return;
153 actions->enqueue([settings = std::move(settings), dev=&device]
154 {
134 dev->apply_settings(settings);155 dev->apply_settings(settings);
135 });156 });
157 }
136}158}
137159
138mir::optional_value<MirKeyboardConfig> mi::DefaultDevice::keyboard_configuration() const160mir::optional_value<MirKeyboardConfig> mi::DefaultDevice::keyboard_configuration() const
@@ -145,9 +167,18 @@
145 if (!contains(info.capabilities, mi::DeviceCapability::keyboard))167 if (!contains(info.capabilities, mi::DeviceCapability::keyboard))
146 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a keyboard configuration"));168 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a keyboard configuration"));
147169
170 std::lock_guard<std::mutex> lock(config_mutex);
171 if (!actions) // device is disabled
172 return;
148 if (keyboard.value().device_keymap() != conf.device_keymap())173 if (keyboard.value().device_keymap() != conf.device_keymap())
149 {
150 keyboard = conf;174 keyboard = conf;
151 key_mapper->set_keymap_for_device(device_id, conf.device_keymap());175 else
152 }176 return;
177 key_mapper->set_keymap_for_device(device_id, conf.device_keymap());
178}
179
180void mi::DefaultDevice::disable_queue()
181{
182 std::lock_guard<std::mutex> lock(config_mutex);
183 actions.reset();
153}184}
154185
=== modified file 'src/server/input/default_device.h'
--- src/server/input/default_device.h 2017-01-18 02:29:37 +0000
+++ src/server/input/default_device.h 2017-06-05 10:39:04 +0000
@@ -29,6 +29,7 @@
29#include "mir/optional_value.h"29#include "mir/optional_value.h"
3030
31#include <memory>31#include <memory>
32#include <mutex>
3233
33namespace mir34namespace mir
34{35{
@@ -58,6 +59,7 @@
58 void apply_touchpad_configuration(MirTouchpadConfig const&) override;59 void apply_touchpad_configuration(MirTouchpadConfig const&) override;
59 optional_value<MirKeyboardConfig> keyboard_configuration() const override;60 optional_value<MirKeyboardConfig> keyboard_configuration() const override;
60 void apply_keyboard_configuration(MirKeyboardConfig const&) override;61 void apply_keyboard_configuration(MirKeyboardConfig const&) override;
62 void disable_queue();
61private:63private:
62 MirInputDeviceId const device_id;64 MirInputDeviceId const device_id;
63 InputDevice& device;65 InputDevice& device;
@@ -65,8 +67,9 @@
65 optional_value<PointerSettings> pointer;67 optional_value<PointerSettings> pointer;
66 optional_value<TouchpadSettings> touchpad;68 optional_value<TouchpadSettings> touchpad;
67 optional_value<MirKeyboardConfig> keyboard;69 optional_value<MirKeyboardConfig> keyboard;
68 std::shared_ptr<dispatch::ActionQueue> const actions;70 std::shared_ptr<dispatch::ActionQueue> actions;
69 std::shared_ptr<KeyMapper> const key_mapper;71 std::shared_ptr<KeyMapper> const key_mapper;
72 std::mutex mutable config_mutex;
70};73};
7174
72}75}
7376
=== modified file 'src/server/input/default_input_device_hub.cpp'
--- src/server/input/default_input_device_hub.cpp 2017-01-19 09:38:52 +0000
+++ src/server/input/default_input_device_hub.cpp 2017-06-05 10:39:04 +0000
@@ -99,15 +99,16 @@
99 if (it == end(devices))99 if (it == end(devices))
100 {100 {
101 auto id = create_new_device_id();101 auto id = create_new_device_id();
102 auto handle = std::make_shared<DefaultDevice>(id, device_queue, *device, key_mapper);102 auto queue = std::make_shared<dispatch::ActionQueue>();
103 auto handle = std::make_shared<DefaultDevice>(id, queue, *device, key_mapper);
103 // send input device info to observer loop..104 // send input device info to observer loop..
104 devices.push_back(std::make_unique<RegisteredDevice>(105 devices.push_back(std::make_unique<RegisteredDevice>(
105 device, id, input_dispatchable, cookie_authority, handle));106 device, handle->id(), queue, cookie_authority, handle));
106107
107 auto const& dev = devices.back();108 auto const& dev = devices.back();
108109
109 seat->add_device(*handle);110 seat->add_device(*handle);
110 dev->start(seat);111 dev->start(seat, input_dispatchable);
111112
112 // pass input device handle to observer loop..113 // pass input device handle to observer loop..
113 observer_queue->enqueue(this,114 observer_queue->enqueue(this,
@@ -115,7 +116,6 @@
115 {116 {
116 add_device_handle(handle);117 add_device_handle(handle);
117 });118 });
118
119 }119 }
120 else120 else
121 {121 {
@@ -140,7 +140,7 @@
140 if (seat)140 if (seat)
141 {141 {
142 seat->remove_device(*item->handle);142 seat->remove_device(*item->handle);
143 item->stop();143 item->stop(input_dispatchable);
144 }144 }
145 // send input device info to observer queue..145 // send input device info to observer queue..
146 observer_queue->enqueue(146 observer_queue->enqueue(
@@ -166,14 +166,14 @@
166mi::DefaultInputDeviceHub::RegisteredDevice::RegisteredDevice(166mi::DefaultInputDeviceHub::RegisteredDevice::RegisteredDevice(
167 std::shared_ptr<InputDevice> const& dev,167 std::shared_ptr<InputDevice> const& dev,
168 MirInputDeviceId device_id,168 MirInputDeviceId device_id,
169 std::shared_ptr<dispatch::MultiplexingDispatchable> const& multiplexer,169 std::shared_ptr<dispatch::ActionQueue> const& queue,
170 std::shared_ptr<mir::cookie::Authority> const& cookie_authority,170 std::shared_ptr<mir::cookie::Authority> const& cookie_authority,
171 std::shared_ptr<mi::DefaultDevice> const& handle)171 std::shared_ptr<mi::DefaultDevice> const& handle)
172 : handle(handle),172 : handle(handle),
173 device_id(device_id),173 device_id(device_id),
174 cookie_authority(cookie_authority),174 cookie_authority(cookie_authority),
175 device(dev),175 device(dev),
176 multiplexer(multiplexer)176 queue(queue)
177{177{
178}178}
179179
@@ -206,17 +206,23 @@
206 return dev == device;206 return dev == device;
207}207}
208208
209void mi::DefaultInputDeviceHub::RegisteredDevice::start(std::shared_ptr<Seat> const& seat)209void mi::DefaultInputDeviceHub::RegisteredDevice::start(std::shared_ptr<Seat> const& seat, std::shared_ptr<dispatch::MultiplexingDispatchable> const& multiplexer)
210{210{
211 multiplexer->add_watch(queue);
212
211 this->seat = seat;213 this->seat = seat;
212 builder = std::make_unique<DefaultEventBuilder>(device_id, cookie_authority, seat);214 builder = std::make_unique<DefaultEventBuilder>(device_id, cookie_authority, seat);
213 device->start(this, builder.get());215 device->start(this, builder.get());
214}216}
215217
216void mi::DefaultInputDeviceHub::RegisteredDevice::stop()218void mi::DefaultInputDeviceHub::RegisteredDevice::stop(std::shared_ptr<dispatch::MultiplexingDispatchable> const& multiplexer)
217{219{
220 multiplexer->remove_watch(queue);
221 handle->disable_queue();
222
218 device->stop();223 device->stop();
219 seat = nullptr;224 seat = nullptr;
225 queue.reset();
220 builder.reset();226 builder.reset();
221}227}
222228
223229
=== modified file 'src/server/input/default_input_device_hub.h'
--- src/server/input/default_input_device_hub.h 2017-01-19 09:38:52 +0000
+++ src/server/input/default_input_device_hub.h 2017-06-05 10:39:04 +0000
@@ -90,6 +90,7 @@
90 void device_changed(Device* dev);90 void device_changed(Device* dev);
91 void emit_changed_devices();91 void emit_changed_devices();
92 MirInputDeviceId create_new_device_id();92 MirInputDeviceId create_new_device_id();
93
93 std::shared_ptr<Seat> const seat;94 std::shared_ptr<Seat> const seat;
94 std::shared_ptr<frontend::EventSink> const sink;95 std::shared_ptr<frontend::EventSink> const sink;
95 std::shared_ptr<dispatch::MultiplexingDispatchable> const input_dispatchable;96 std::shared_ptr<dispatch::MultiplexingDispatchable> const input_dispatchable;
@@ -105,14 +106,14 @@
105 public:106 public:
106 RegisteredDevice(std::shared_ptr<InputDevice> const& dev,107 RegisteredDevice(std::shared_ptr<InputDevice> const& dev,
107 MirInputDeviceId dev_id,108 MirInputDeviceId dev_id,
108 std::shared_ptr<dispatch::MultiplexingDispatchable> const& multiplexer,109 std::shared_ptr<dispatch::ActionQueue> const& multiplexer,
109 std::shared_ptr<cookie::Authority> const& cookie_authority,110 std::shared_ptr<cookie::Authority> const& cookie_authority,
110 std::shared_ptr<DefaultDevice> const& handle);111 std::shared_ptr<DefaultDevice> const& handle);
111 void handle_input(MirEvent& event) override;112 void handle_input(MirEvent& event) override;
112 mir::geometry::Rectangle bounding_rectangle() const override;113 mir::geometry::Rectangle bounding_rectangle() const override;
113 bool device_matches(std::shared_ptr<InputDevice> const& dev) const;114 bool device_matches(std::shared_ptr<InputDevice> const& dev) const;
114 void start(std::shared_ptr<Seat> const& seat);115 void start(std::shared_ptr<Seat> const& seat, std::shared_ptr<dispatch::MultiplexingDispatchable> const& dispatchable);
115 void stop();116 void stop(std::shared_ptr<dispatch::MultiplexingDispatchable> const& dispatchable);
116 MirInputDeviceId id();117 MirInputDeviceId id();
117 std::shared_ptr<Seat> seat;118 std::shared_ptr<Seat> seat;
118 const std::shared_ptr<DefaultDevice> handle;119 const std::shared_ptr<DefaultDevice> handle;
@@ -124,7 +125,7 @@
124 std::unique_ptr<DefaultEventBuilder> builder;125 std::unique_ptr<DefaultEventBuilder> builder;
125 std::shared_ptr<cookie::Authority> cookie_authority;126 std::shared_ptr<cookie::Authority> cookie_authority;
126 std::shared_ptr<InputDevice> const device;127 std::shared_ptr<InputDevice> const device;
127 std::shared_ptr<dispatch::MultiplexingDispatchable> const multiplexer;128 std::shared_ptr<dispatch::ActionQueue> queue;
128 };129 };
129130
130 std::vector<std::shared_ptr<Device>> handles;131 std::vector<std::shared_ptr<Device>> handles;
131132
=== modified file 'tests/unit-tests/input/test_default_device.cpp'
--- tests/unit-tests/input/test_default_device.cpp 2017-01-18 02:29:37 +0000
+++ tests/unit-tests/input/test_default_device.cpp 2017-06-05 10:39:04 +0000
@@ -155,3 +155,26 @@
155155
156 queue->dispatch(md::FdEvent::readable);156 queue->dispatch(md::FdEvent::readable);
157}157}
158
159TEST_F(DefaultDevice, disable_queue_ends_config_processing)
160{
161 mi::DefaultDevice dev(MirInputDeviceId{17}, queue, touchpad, mt::fake_shared(key_mapper));
162
163 dev.disable_queue();
164 MirPointerConfig pointer_conf;
165 pointer_conf.cursor_acceleration_bias(1.0);
166
167 EXPECT_CALL(touchpad, apply_settings(Matcher<mi::TouchpadSettings const&>(_))).Times(0);
168 dev.apply_pointer_configuration(pointer_conf);
169}
170
171TEST_F(DefaultDevice, disable_queue_removes_reference_to_queue)
172{
173 std::weak_ptr<md::ActionQueue> ref = queue;
174 mi::DefaultDevice dev(MirInputDeviceId{17}, queue, touchpad, mt::fake_shared(key_mapper));
175 queue.reset();
176
177 EXPECT_THAT(ref.lock(), Ne(nullptr));
178 dev.disable_queue();
179 EXPECT_THAT(ref.lock(), Eq(nullptr));
180}
158181
=== modified file 'tests/unit-tests/input/test_default_input_device_hub.cpp'
--- tests/unit-tests/input/test_default_input_device_hub.cpp 2017-01-19 09:38:52 +0000
+++ tests/unit-tests/input/test_default_input_device_hub.cpp 2017-06-05 10:39:04 +0000
@@ -236,3 +236,21 @@
236 observer_loop.trigger_server_actions();236 observer_loop.trigger_server_actions();
237}237}
238238
239TEST_F(InputDeviceHubTest, no_device_config_action_after_device_removal)
240{
241 std::shared_ptr<mi::Device> dev_ptr;
242 MirPointerConfig ptr_config;
243 ptr_config.cursor_acceleration_bias(0.5);
244
245 ON_CALL(mock_observer, device_added(WithName("mouse"))).WillByDefault(SaveArg<0>(&dev_ptr));
246
247 hub.add_device(mt::fake_shared(mouse));
248 hub.add_observer(mt::fake_shared(mock_observer));
249 observer_loop.trigger_server_actions();
250
251 EXPECT_CALL(mouse, apply_settings(Matcher<mi::PointerSettings const&>(_))).Times(0);
252
253 dev_ptr->apply_pointer_configuration(ptr_config);
254 hub.remove_device(mt::fake_shared(mouse));
255 observer_loop.trigger_server_actions();
256}

Subscribers

People subscribed via source and target branches

to all changes: