Merge lp:~mir-team/mir/zesty-0.26 into lp:mir/zesty
- zesty-0.26
- Merge into 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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Griffiths | Approve | ||
Review via email: mp+325068@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2017-02-17 02:24:03 +0000 | |||
3 | +++ CMakeLists.txt 2017-06-05 10:39:04 +0000 | |||
4 | @@ -29,7 +29,7 @@ | |||
5 | 29 | 29 | ||
6 | 30 | set(MIR_VERSION_MAJOR 0) | 30 | set(MIR_VERSION_MAJOR 0) |
7 | 31 | set(MIR_VERSION_MINOR 26) | 31 | set(MIR_VERSION_MINOR 26) |
9 | 32 | set(MIR_VERSION_PATCH 2) | 32 | set(MIR_VERSION_PATCH 3) |
10 | 33 | 33 | ||
11 | 34 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) | 34 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) |
12 | 35 | add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) | 35 | add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) |
13 | 36 | 36 | ||
14 | === modified file 'debian/changelog' | |||
15 | --- debian/changelog 2017-04-12 21:43:04 +0000 | |||
16 | +++ debian/changelog 2017-06-05 10:39:04 +0000 | |||
17 | @@ -1,3 +1,23 @@ | |||
18 | 1 | mir (0.26.3) UNRELEASED; urgency=medium | ||
19 | 2 | |||
20 | 3 | [ Daniel van Vugt ] | ||
21 | 4 | * New upstream release 0.26.3 (https://launchpad.net/mir/+milestone/0.26.3) | ||
22 | 5 | - Enhancements: | ||
23 | 6 | . Make deprecations optional (and default to off for builds on 16.04 LTS) | ||
24 | 7 | . Added support for building on Ubuntu 17.10 artful. | ||
25 | 8 | - Bugs fixed: | ||
26 | 9 | . Mir needs to be updated to 0.26 in 16.04LTS (LP: #1685186) | ||
27 | 10 | . unity-system-compositor crashed with SIGSEGV in | ||
28 | 11 | libinput_device_config_accel_is_available() from | ||
29 | 12 | libinput_device_config_accel_set_speed() from | ||
30 | 13 | mir::input::evdev::LibInputDevice::apply_settings() (LP: #1672955) | ||
31 | 14 | . Please transition to Boost 1.62 (LP: #1675138) | ||
32 | 15 | . Mir sending key repeat events continually to nested shell after VT | ||
33 | 16 | switch (causes Unity8 lockup for a while) (LP: #1675357) | ||
34 | 17 | . mir_demo_standalone_render_overlays fails to link (LP: #1677239) | ||
35 | 18 | |||
36 | 19 | -- Alan Griffiths <alan.griffiths@canonical.com> Fri, 26 May 2017 16:57:20 +0000 | ||
37 | 20 | |||
38 | 1 | mir (0.26.2+17.04.20170322.1-0ubuntu2) zesty; urgency=medium | 21 | mir (0.26.2+17.04.20170322.1-0ubuntu2) zesty; urgency=medium |
39 | 2 | 22 | ||
40 | 3 | [ Mattia Rizzolo ] | 23 | [ Mattia Rizzolo ] |
41 | 4 | 24 | ||
42 | === modified file 'include/client/mir/event_printer.h' | |||
43 | --- include/client/mir/event_printer.h 2017-01-19 05:30:03 +0000 | |||
44 | +++ include/client/mir/event_printer.h 2017-06-05 10:39:04 +0000 | |||
45 | @@ -35,19 +35,19 @@ | |||
46 | 35 | std::ostream& operator<<(std::ostream& out, MirOrientation orientation); | 35 | std::ostream& operator<<(std::ostream& out, MirOrientation orientation); |
47 | 36 | 36 | ||
48 | 37 | std::ostream& operator<<(std::ostream& out, MirSurfaceAttrib attribute) | 37 | std::ostream& operator<<(std::ostream& out, MirSurfaceAttrib attribute) |
50 | 38 | __attribute__ ((deprecated("use << with MirWindowAttrib instead"))); | 38 | MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowAttrib instead"); |
51 | 39 | std::ostream& operator<<(std::ostream& out, MirWindowAttrib attribute); | 39 | std::ostream& operator<<(std::ostream& out, MirWindowAttrib attribute); |
52 | 40 | std::ostream& operator<<(std::ostream& out, MirSurfaceFocusState state) | 40 | std::ostream& operator<<(std::ostream& out, MirSurfaceFocusState state) |
54 | 41 | __attribute__ ((deprecated("use << with MirWindowFocusState instead"))); | 41 | MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowFocusState instead"); |
55 | 42 | std::ostream& operator<<(std::ostream& out, MirWindowFocusState state); | 42 | std::ostream& operator<<(std::ostream& out, MirWindowFocusState state); |
56 | 43 | std::ostream& operator<<(std::ostream& out, MirSurfaceVisibility state) | 43 | std::ostream& operator<<(std::ostream& out, MirSurfaceVisibility state) |
58 | 44 | __attribute__ ((deprecated("use << with MirWindowVisibility instead"))); | 44 | MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowVisibility instead"); |
59 | 45 | std::ostream& operator<<(std::ostream& out, MirWindowVisibility state); | 45 | std::ostream& operator<<(std::ostream& out, MirWindowVisibility state); |
60 | 46 | std::ostream& operator<<(std::ostream& out, MirSurfaceType type) | 46 | std::ostream& operator<<(std::ostream& out, MirSurfaceType type) |
62 | 47 | __attribute__ ((deprecated("use << with MirWindowType instead"))); | 47 | MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowType instead"); |
63 | 48 | std::ostream& operator<<(std::ostream& out, MirWindowType type); | 48 | std::ostream& operator<<(std::ostream& out, MirWindowType type); |
64 | 49 | std::ostream& operator<<(std::ostream& out, MirSurfaceState state) | 49 | std::ostream& operator<<(std::ostream& out, MirSurfaceState state) |
66 | 50 | __attribute__ ((deprecated("use << with MirWindowState instead"))); | 50 | MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowState instead"); |
67 | 51 | std::ostream& operator<<(std::ostream& out, MirWindowState state); | 51 | std::ostream& operator<<(std::ostream& out, MirWindowState state); |
68 | 52 | 52 | ||
69 | 53 | std::ostream& operator<<(std::ostream& out, MirPromptSessionEvent const& event); | 53 | std::ostream& operator<<(std::ostream& out, MirPromptSessionEvent const& event); |
70 | 54 | 54 | ||
71 | === modified file 'include/client/mir/events/event_builders.h' | |||
72 | --- include/client/mir/events/event_builders.h 2017-01-19 05:30:03 +0000 | |||
73 | +++ include/client/mir/events/event_builders.h 2017-06-05 10:39:04 +0000 | |||
74 | @@ -48,7 +48,7 @@ | |||
75 | 48 | EventUPtr make_event(frontend::SurfaceId const& surface_id, geometry::Size const& size); | 48 | EventUPtr make_event(frontend::SurfaceId const& surface_id, geometry::Size const& size); |
76 | 49 | // Surface configure event | 49 | // Surface configure event |
77 | 50 | EventUPtr make_event(frontend::SurfaceId const& surface_id, MirSurfaceAttrib attribute, int value) | 50 | EventUPtr make_event(frontend::SurfaceId const& surface_id, MirSurfaceAttrib attribute, int value) |
79 | 51 | __attribute__ ((deprecated("use make_event with MirWindowAttribute instead"))); | 51 | MIR_FOR_REMOVAL_IN_VERSION_1("use make_event with MirWindowAttribute instead"); |
80 | 52 | // Window configure event | 52 | // Window configure event |
81 | 53 | EventUPtr make_event(frontend::SurfaceId const& surface_id, MirWindowAttrib attribute, int value); | 53 | EventUPtr make_event(frontend::SurfaceId const& surface_id, MirWindowAttrib attribute, int value); |
82 | 54 | // Close surface event | 54 | // Close surface event |
83 | @@ -81,12 +81,12 @@ | |||
84 | 81 | // Deprecated version with uint64_t mac | 81 | // Deprecated version with uint64_t mac |
85 | 82 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, | 82 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
86 | 83 | uint64_t mac, MirKeyboardAction action, xkb_keysym_t key_code, | 83 | uint64_t mac, MirKeyboardAction action, xkb_keysym_t key_code, |
88 | 84 | int scan_code, MirInputEventModifiers modifiers) __attribute__ ((deprecated)); | 84 | int scan_code, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused"); |
89 | 85 | 85 | ||
90 | 86 | // Deprecated version without mac | 86 | // Deprecated version without mac |
91 | 87 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, | 87 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
92 | 88 | MirKeyboardAction action, xkb_keysym_t key_code, | 88 | MirKeyboardAction action, xkb_keysym_t key_code, |
94 | 89 | int scan_code, MirInputEventModifiers modifiers) __attribute__ ((deprecated)); | 89 | int scan_code, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused"); |
95 | 90 | 90 | ||
96 | 91 | // Touch event | 91 | // Touch event |
97 | 92 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, | 92 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
98 | @@ -94,11 +94,11 @@ | |||
99 | 94 | 94 | ||
100 | 95 | // Deprecated version with uint64_t mac | 95 | // Deprecated version with uint64_t mac |
101 | 96 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, | 96 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
103 | 97 | uint64_t mac, MirInputEventModifiers modifiers) __attribute__ ((deprecated)); | 97 | uint64_t mac, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused"); |
104 | 98 | 98 | ||
105 | 99 | // Deprecated version without mac | 99 | // Deprecated version without mac |
106 | 100 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, | 100 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
108 | 101 | MirInputEventModifiers modifiers) __attribute__ ((deprecated)); | 101 | MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused"); |
109 | 102 | 102 | ||
110 | 103 | void add_touch(MirEvent &event, MirTouchId touch_id, MirTouchAction action, | 103 | void add_touch(MirEvent &event, MirTouchId touch_id, MirTouchAction action, |
111 | 104 | MirTouchTooltype tooltype, float x_axis_value, float y_axis_value, | 104 | MirTouchTooltype tooltype, float x_axis_value, float y_axis_value, |
112 | @@ -110,14 +110,14 @@ | |||
113 | 110 | uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action, | 110 | uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action, |
114 | 111 | MirPointerButtons buttons_pressed, | 111 | MirPointerButtons buttons_pressed, |
115 | 112 | float x_axis_value, float y_axis_value, | 112 | float x_axis_value, float y_axis_value, |
117 | 113 | float hscroll_value, float vscroll_value) __attribute__ ((deprecated)); | 113 | float hscroll_value, float vscroll_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused"); |
118 | 114 | 114 | ||
119 | 115 | // Deprecated version without relative axis and mac | 115 | // Deprecated version without relative axis and mac |
120 | 116 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, | 116 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
121 | 117 | MirInputEventModifiers modifiers, MirPointerAction action, | 117 | MirInputEventModifiers modifiers, MirPointerAction action, |
122 | 118 | MirPointerButtons buttons_pressed, | 118 | MirPointerButtons buttons_pressed, |
123 | 119 | float x_axis_value, float y_axis_value, | 119 | float x_axis_value, float y_axis_value, |
125 | 120 | float hscroll_value, float vscroll_value) __attribute__ ((deprecated)); | 120 | float hscroll_value, float vscroll_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused"); |
126 | 121 | 121 | ||
127 | 122 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, | 122 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
128 | 123 | std::vector<uint8_t> const& mac, MirInputEventModifiers modifiers, MirPointerAction action, | 123 | std::vector<uint8_t> const& mac, MirInputEventModifiers modifiers, MirPointerAction action, |
129 | @@ -132,7 +132,7 @@ | |||
130 | 132 | MirPointerButtons buttons_pressed, | 132 | MirPointerButtons buttons_pressed, |
131 | 133 | float x_axis_value, float y_axis_value, | 133 | float x_axis_value, float y_axis_value, |
132 | 134 | float hscroll_value, float vscroll_value, | 134 | float hscroll_value, float vscroll_value, |
134 | 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"); |
135 | 136 | 136 | ||
136 | 137 | // Deprecated version without mac | 137 | // Deprecated version without mac |
137 | 138 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, | 138 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
138 | @@ -140,11 +140,11 @@ | |||
139 | 140 | MirPointerButtons buttons_pressed, | 140 | MirPointerButtons buttons_pressed, |
140 | 141 | float x_axis_value, float y_axis_value, | 141 | float x_axis_value, float y_axis_value, |
141 | 142 | float hscroll_value, float vscroll_value, | 142 | float hscroll_value, float vscroll_value, |
143 | 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"); |
144 | 144 | 144 | ||
145 | 145 | // Input configuration event | 145 | // Input configuration event |
146 | 146 | EventUPtr make_event(MirInputConfigurationAction action, | 146 | EventUPtr make_event(MirInputConfigurationAction action, |
148 | 147 | MirInputDeviceId id, std::chrono::nanoseconds time) __attribute__((deprecated)); | 147 | MirInputDeviceId id, std::chrono::nanoseconds time) MIR_FOR_REMOVAL_IN_VERSION_1("unused"); |
149 | 148 | 148 | ||
150 | 149 | EventUPtr make_event(std::chrono::nanoseconds timestamp, | 149 | EventUPtr make_event(std::chrono::nanoseconds timestamp, |
151 | 150 | MirPointerButtons pointer_buttons, | 150 | MirPointerButtons pointer_buttons, |
152 | 151 | 151 | ||
153 | === modified file 'include/client/mir_toolkit/client_types.h' | |||
154 | --- include/client/mir_toolkit/client_types.h 2017-03-16 16:47:21 +0000 | |||
155 | +++ include/client/mir_toolkit/client_types.h 2017-06-05 10:39:04 +0000 | |||
156 | @@ -23,6 +23,7 @@ | |||
157 | 23 | 23 | ||
158 | 24 | #include <mir_toolkit/events/event.h> | 24 | #include <mir_toolkit/events/event.h> |
159 | 25 | #include <mir_toolkit/common.h> | 25 | #include <mir_toolkit/common.h> |
160 | 26 | #include <mir_toolkit/deprecations.h> | ||
161 | 26 | 27 | ||
162 | 27 | #include <stddef.h> | 28 | #include <stddef.h> |
163 | 28 | 29 | ||
164 | @@ -38,23 +39,22 @@ | |||
165 | 38 | typedef void* MirEGLNativeWindowType; | 39 | typedef void* MirEGLNativeWindowType; |
166 | 39 | typedef void* MirEGLNativeDisplayType; | 40 | typedef void* MirEGLNativeDisplayType; |
167 | 40 | typedef struct MirConnection MirConnection; | 41 | typedef struct MirConnection MirConnection; |
169 | 41 | typedef struct MirSurface MirSurface __attribute__((deprecated("Use MirWindow instead"))); | 42 | typedef struct MirSurface MirSurface MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindow instead"); |
170 | 42 | typedef struct MirSurface MirWindow; | 43 | typedef struct MirSurface MirWindow; |
172 | 43 | typedef struct MirSurfaceSpec MirSurfaceSpec __attribute__((deprecated("Use MirWindowSpec instead"))); | 44 | typedef struct MirSurfaceSpec MirSurfaceSpec MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowSpec instead"); |
173 | 44 | typedef struct MirSurfaceSpec MirWindowSpec; | 45 | typedef struct MirSurfaceSpec MirWindowSpec; |
174 | 45 | typedef struct MirScreencast MirScreencast; | 46 | typedef struct MirScreencast MirScreencast; |
175 | 46 | typedef struct MirScreencastSpec MirScreencastSpec; | 47 | typedef struct MirScreencastSpec MirScreencastSpec; |
176 | 47 | typedef struct MirPromptSession MirPromptSession; | 48 | typedef struct MirPromptSession MirPromptSession; |
177 | 48 | typedef struct MirBufferStream MirBufferStream; | 49 | typedef struct MirBufferStream MirBufferStream; |
179 | 49 | typedef struct MirPersistentId MirPersistentId __attribute((deprecated("Use MirWindowId instead"))); | 50 | typedef struct MirPersistentId MirPersistentId MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowId instead"); |
180 | 50 | typedef struct MirPersistentId MirWindowId; | 51 | typedef struct MirPersistentId MirWindowId; |
181 | 51 | typedef struct MirBlob MirBlob; | 52 | typedef struct MirBlob MirBlob; |
182 | 52 | typedef struct MirDisplayConfig MirDisplayConfig; | 53 | typedef struct MirDisplayConfig MirDisplayConfig; |
183 | 53 | typedef struct MirError MirError; | 54 | typedef struct MirError MirError; |
184 | 54 | typedef struct MirPresentationChain MirPresentationChain; | 55 | typedef struct MirPresentationChain MirPresentationChain; |
185 | 55 | typedef struct MirBuffer MirBuffer; | 56 | typedef struct MirBuffer MirBuffer; |
188 | 56 | typedef struct MirRenderSurface MirRenderSurface | 57 | typedef struct MirRenderSurface MirRenderSurface; |
187 | 57 | __attribute__((deprecated("This type is slated for rename due to MirRenderSurface-->MirSurface transition"))); | ||
189 | 58 | 58 | ||
190 | 59 | /** | 59 | /** |
191 | 60 | * Descriptor for an output connection. | 60 | * Descriptor for an output connection. |
192 | @@ -82,7 +82,7 @@ | |||
193 | 82 | typedef void (*MirConnectedCallback)( | 82 | typedef void (*MirConnectedCallback)( |
194 | 83 | MirConnection *connection, void *client_context); | 83 | MirConnection *connection, void *client_context); |
195 | 84 | typedef MirConnectedCallback mir_connected_callback | 84 | typedef MirConnectedCallback mir_connected_callback |
197 | 85 | __attribute__((deprecated("Use MirConnectedCallback instead"))); | 85 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirConnectedCallback instead"); |
198 | 86 | 86 | ||
199 | 87 | /** | 87 | /** |
200 | 88 | * Callback to be passed when calling window functions : | 88 | * Callback to be passed when calling window functions : |
201 | @@ -102,7 +102,7 @@ | |||
202 | 102 | typedef void (*MirBufferStreamCallback)( | 102 | typedef void (*MirBufferStreamCallback)( |
203 | 103 | MirBufferStream *stream, void *client_context); | 103 | MirBufferStream *stream, void *client_context); |
204 | 104 | typedef MirBufferStreamCallback mir_buffer_stream_callback | 104 | typedef MirBufferStreamCallback mir_buffer_stream_callback |
206 | 105 | __attribute__((deprecated("Use MirBufferStreamCallback instead"))); | 105 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirBufferStreamCallback instead"); |
207 | 106 | 106 | ||
208 | 107 | /** | 107 | /** |
209 | 108 | * Callback for handling of window events. | 108 | * Callback for handling of window events. |
210 | @@ -124,7 +124,7 @@ | |||
211 | 124 | typedef void (*MirLifecycleEventCallback)( | 124 | typedef void (*MirLifecycleEventCallback)( |
212 | 125 | MirConnection* connection, MirLifecycleState state, void* context); | 125 | MirConnection* connection, MirLifecycleState state, void* context); |
213 | 126 | typedef MirLifecycleEventCallback mir_lifecycle_event_callback | 126 | typedef MirLifecycleEventCallback mir_lifecycle_event_callback |
215 | 127 | __attribute__((deprecated("Use MirLifecycleEventCallback instead"))); | 127 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirLifecycleEventCallback instead"); |
216 | 128 | 128 | ||
217 | 129 | /** | 129 | /** |
218 | 130 | * Callback called when the server pings for responsiveness testing. | 130 | * Callback called when the server pings for responsiveness testing. |
219 | @@ -136,7 +136,7 @@ | |||
220 | 136 | typedef void (*MirPingEventCallback)( | 136 | typedef void (*MirPingEventCallback)( |
221 | 137 | MirConnection* connection, int32_t serial, void* context); | 137 | MirConnection* connection, int32_t serial, void* context); |
222 | 138 | typedef MirPingEventCallback mir_ping_event_callback | 138 | typedef MirPingEventCallback mir_ping_event_callback |
224 | 139 | __attribute__((deprecated("Use MirPingEventCallback instead"))); | 139 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPingEventCallback instead"); |
225 | 140 | 140 | ||
226 | 141 | /** | 141 | /** |
227 | 142 | * Callback called when a display config change has occurred | 142 | * Callback called when a display config change has occurred |
228 | @@ -147,7 +147,7 @@ | |||
229 | 147 | typedef void (*MirDisplayConfigCallback)( | 147 | typedef void (*MirDisplayConfigCallback)( |
230 | 148 | MirConnection* connection, void* context); | 148 | MirConnection* connection, void* context); |
231 | 149 | typedef MirDisplayConfigCallback mir_display_config_callback | 149 | typedef MirDisplayConfigCallback mir_display_config_callback |
233 | 150 | __attribute__((deprecated("Use MirDisplayConfigCallback instead"))); | 150 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirDisplayConfigCallback instead"); |
234 | 151 | 151 | ||
235 | 152 | /** | 152 | /** |
236 | 153 | * Callback called when a request for client file descriptors completes | 153 | * Callback called when a request for client file descriptors completes |
237 | @@ -162,7 +162,7 @@ | |||
238 | 162 | typedef void (*MirClientFdCallback)( | 162 | typedef void (*MirClientFdCallback)( |
239 | 163 | MirPromptSession *prompt_session, size_t count, int const* fds, void* context); | 163 | MirPromptSession *prompt_session, size_t count, int const* fds, void* context); |
240 | 164 | typedef MirClientFdCallback mir_client_fd_callback | 164 | typedef MirClientFdCallback mir_client_fd_callback |
242 | 165 | __attribute__((deprecated("Use MirClientFdCallback instead"))); | 165 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirClientFdCallback instead"); |
243 | 166 | 166 | ||
244 | 167 | #pragma GCC diagnostic push | 167 | #pragma GCC diagnostic push |
245 | 168 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 168 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
246 | @@ -201,7 +201,7 @@ | |||
247 | 201 | * use the value mir_display_output_id_invalid. | 201 | * use the value mir_display_output_id_invalid. |
248 | 202 | */ | 202 | */ |
249 | 203 | uint32_t output_id; | 203 | uint32_t output_id; |
251 | 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"); |
252 | 205 | 205 | ||
253 | 206 | enum { mir_platform_package_max = 32 }; | 206 | enum { mir_platform_package_max = 32 }; |
254 | 207 | 207 | ||
255 | @@ -214,7 +214,7 @@ | |||
256 | 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. |
257 | 215 | */ | 215 | */ |
258 | 216 | #ifndef __cplusplus | 216 | #ifndef __cplusplus |
260 | 217 | __attribute__ ((deprecated)) | 217 | MIR_FOR_REMOVAL_IN_VERSION_1("Use of this type is inherently non-portable") |
261 | 218 | #endif | 218 | #endif |
262 | 219 | typedef enum MirPlatformType | 219 | typedef enum MirPlatformType |
263 | 220 | { | 220 | { |
264 | @@ -429,7 +429,7 @@ | |||
265 | 429 | typedef void (*MirScreencastCallback)( | 429 | typedef void (*MirScreencastCallback)( |
266 | 430 | MirScreencast *screencast, void *client_context); | 430 | MirScreencast *screencast, void *client_context); |
267 | 431 | typedef MirScreencastCallback mir_screencast_callback | 431 | typedef MirScreencastCallback mir_screencast_callback |
269 | 432 | __attribute__((deprecated("Use MirScreencastCallback instead"))); | 432 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirScreencastCallback instead"); |
270 | 433 | 433 | ||
271 | 434 | /** | 434 | /** |
272 | 435 | * Callback member of MirPromptSession for handling of prompt sessions. | 435 | * Callback member of MirPromptSession for handling of prompt sessions. |
273 | @@ -439,7 +439,7 @@ | |||
274 | 439 | typedef void (*MirPromptSessionCallback)( | 439 | typedef void (*MirPromptSessionCallback)( |
275 | 440 | MirPromptSession* prompt_provider, void* context); | 440 | MirPromptSession* prompt_provider, void* context); |
276 | 441 | typedef MirPromptSessionCallback mir_prompt_session_callback | 441 | typedef MirPromptSessionCallback mir_prompt_session_callback |
278 | 442 | __attribute__((deprecated("Use MirPromptSessionCallback instead"))); | 442 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPromptSessionCallback instead"); |
279 | 443 | 443 | ||
280 | 444 | /** | 444 | /** |
281 | 445 | * Callback member of MirPromptSession for handling of prompt sessions events. | 445 | * Callback member of MirPromptSession for handling of prompt sessions events. |
282 | @@ -452,7 +452,7 @@ | |||
283 | 452 | void* context); | 452 | void* context); |
284 | 453 | typedef MirPromptSessionStateChangeCallback | 453 | typedef MirPromptSessionStateChangeCallback |
285 | 454 | mir_prompt_session_state_change_callback | 454 | mir_prompt_session_state_change_callback |
287 | 455 | __attribute__((deprecated("Use MirPromptSessionStateChangeCallback instead"))); | 455 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPromptSessionStateChangeCallback instead"); |
288 | 456 | 456 | ||
289 | 457 | /** | 457 | /** |
290 | 458 | * Callback called when a platform operation completes. | 458 | * Callback called when a platform operation completes. |
291 | @@ -467,7 +467,7 @@ | |||
292 | 467 | typedef void (*MirPlatformOperationCallback)( | 467 | typedef void (*MirPlatformOperationCallback)( |
293 | 468 | MirConnection* connection, MirPlatformMessage* reply, void* context); | 468 | MirConnection* connection, MirPlatformMessage* reply, void* context); |
294 | 469 | typedef MirPlatformOperationCallback mir_platform_operation_callback | 469 | typedef MirPlatformOperationCallback mir_platform_operation_callback |
296 | 470 | __attribute__((deprecated("Use MirPlatformOperationCallback instead"))); | 470 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirPlatformOperationCallback instead"); |
297 | 471 | 471 | ||
298 | 472 | /** | 472 | /** |
299 | 473 | * Callback called when a change of input devices has occurred | 473 | * Callback called when a change of input devices has occurred |
300 | @@ -479,7 +479,7 @@ | |||
301 | 479 | typedef void (*MirInputConfigCallback)( | 479 | typedef void (*MirInputConfigCallback)( |
302 | 480 | MirConnection* connection, void* context); | 480 | MirConnection* connection, void* context); |
303 | 481 | typedef MirInputConfigCallback mir_input_config_callback | 481 | typedef MirInputConfigCallback mir_input_config_callback |
305 | 482 | __attribute__((deprecated("Use MirInputConfigCallback instead"))); | 482 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirInputConfigCallback instead"); |
306 | 483 | 483 | ||
307 | 484 | typedef void (*MirBufferCallback)(MirBuffer*, void* context); | 484 | typedef void (*MirBufferCallback)(MirBuffer*, void* context); |
308 | 485 | 485 | ||
309 | @@ -539,24 +539,21 @@ | |||
310 | 539 | typedef void (*MirErrorCallback)( | 539 | typedef void (*MirErrorCallback)( |
311 | 540 | MirConnection* connection, MirError const* error, void* context); | 540 | MirConnection* connection, MirError const* error, void* context); |
312 | 541 | typedef MirErrorCallback mir_error_callback | 541 | typedef MirErrorCallback mir_error_callback |
314 | 542 | __attribute__((deprecated("Use MirErrorCallback instead"))); | 542 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirErrorCallback instead"); |
315 | 543 | 543 | ||
316 | 544 | #pragma GCC diagnostic push | 544 | #pragma GCC diagnostic push |
317 | 545 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 545 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
318 | 546 | 546 | ||
319 | 547 | typedef void (*mir_surface_callback)(MirSurface *surface, void *client_context) | 547 | typedef void (*mir_surface_callback)(MirSurface *surface, void *client_context) |
321 | 548 | __attribute__((deprecated("Use MirWindowCallback instead"))); | 548 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowCallback instead"); |
322 | 549 | 549 | ||
323 | 550 | typedef void (*mir_surface_event_callback)( | 550 | typedef void (*mir_surface_event_callback)( |
324 | 551 | MirSurface* surface, MirEvent const* event, void* context) | 551 | MirSurface* surface, MirEvent const* event, void* context) |
326 | 552 | __attribute__((deprecated("Use MirWindowEventCallback instead"))); | 552 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowEventCallback instead"); |
327 | 553 | 553 | ||
328 | 554 | typedef void (*mir_surface_id_callback)( | 554 | typedef void (*mir_surface_id_callback)( |
329 | 555 | MirSurface* surface, MirPersistentId* id, void* context) | 555 | MirSurface* surface, MirPersistentId* id, void* context) |
334 | 556 | __attribute__((deprecated("Use MirWindowIdCallback instead"))); | 556 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowIdCallback instead"); |
331 | 557 | |||
332 | 558 | typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context) | ||
333 | 559 | __attribute__((deprecated("This type is slated for rename due to MirRenderSurface-->MirSurface transition"))); | ||
335 | 560 | 557 | ||
336 | 561 | typedef MirSurfaceParameters MirWindowParameters; | 558 | typedef MirSurfaceParameters MirWindowParameters; |
337 | 562 | 559 | ||
338 | 563 | 560 | ||
339 | === modified file 'include/client/mir_toolkit/debug/surface.h' | |||
340 | --- include/client/mir_toolkit/debug/surface.h 2017-01-18 04:43:15 +0000 | |||
341 | +++ include/client/mir_toolkit/debug/surface.h 2017-06-05 10:39:04 +0000 | |||
342 | @@ -19,6 +19,7 @@ | |||
343 | 19 | #define MIR_CLIENT_LIBRARY_DEBUG_H | 19 | #define MIR_CLIENT_LIBRARY_DEBUG_H |
344 | 20 | 20 | ||
345 | 21 | #include <mir_toolkit/mir_client_library.h> | 21 | #include <mir_toolkit/mir_client_library.h> |
346 | 22 | #include <mir_toolkit/deprecations.h> | ||
347 | 22 | 23 | ||
348 | 23 | /* This header defines debug interfaces that aren't expected to be generally useful | 24 | /* This header defines debug interfaces that aren't expected to be generally useful |
349 | 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 */ |
350 | @@ -65,13 +66,13 @@ | |||
351 | 65 | bool mir_debug_surface_coords_to_screen(MirSurface *surface, | 66 | bool mir_debug_surface_coords_to_screen(MirSurface *surface, |
352 | 66 | int x, int y, | 67 | int x, int y, |
353 | 67 | int* screen_x, int* screen_y) | 68 | int* screen_x, int* screen_y) |
355 | 68 | __attribute__((deprecated("Use mir_extension_window_coordinate_translation instead"))); | 69 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_extension_window_coordinate_translation instead"); |
356 | 69 | 70 | ||
357 | 70 | int mir_debug_surface_id(MirSurface *surface) | 71 | int mir_debug_surface_id(MirSurface *surface) |
359 | 71 | __attribute__((deprecated("Use mir_debug_window_id() instead"))); | 72 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_debug_window_id() instead"); |
360 | 72 | 73 | ||
361 | 73 | uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface) | 74 | uint32_t mir_debug_surface_current_buffer_id(MirSurface *surface) |
363 | 74 | __attribute__((deprecated("Use mir_debug_window_current_buffer_id() instead"))); | 75 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_debug_window_current_buffer_id() instead"); |
364 | 75 | 76 | ||
365 | 76 | #pragma GCC diagnostic pop | 77 | #pragma GCC diagnostic pop |
366 | 77 | 78 | ||
367 | 78 | 79 | ||
368 | === modified file 'include/client/mir_toolkit/events/event.h' | |||
369 | --- include/client/mir_toolkit/events/event.h 2017-01-25 08:12:00 +0000 | |||
370 | +++ include/client/mir_toolkit/events/event.h 2017-06-05 10:39:04 +0000 | |||
371 | @@ -22,6 +22,7 @@ | |||
372 | 22 | #include <stddef.h> | 22 | #include <stddef.h> |
373 | 23 | #include <stdint.h> | 23 | #include <stdint.h> |
374 | 24 | #include "mir_toolkit/common.h" | 24 | #include "mir_toolkit/common.h" |
375 | 25 | #include <mir_toolkit/deprecations.h> | ||
376 | 25 | 26 | ||
377 | 26 | #ifdef __cplusplus | 27 | #ifdef __cplusplus |
378 | 27 | /** | 28 | /** |
379 | @@ -58,24 +59,24 @@ | |||
380 | 58 | #pragma GCC diagnostic pop | 59 | #pragma GCC diagnostic pop |
381 | 59 | 60 | ||
382 | 60 | typedef struct MirSurfaceEvent MirSurfaceEvent | 61 | typedef struct MirSurfaceEvent MirSurfaceEvent |
384 | 61 | __attribute__ ((deprecated("use MirWindowEvent instead"))); | 62 | MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowEvent instead"); |
385 | 62 | typedef struct MirSurfaceEvent MirWindowEvent; | 63 | typedef struct MirSurfaceEvent MirWindowEvent; |
386 | 63 | typedef struct MirResizeEvent MirResizeEvent; | 64 | typedef struct MirResizeEvent MirResizeEvent; |
387 | 64 | typedef struct MirPromptSessionEvent MirPromptSessionEvent; | 65 | typedef struct MirPromptSessionEvent MirPromptSessionEvent; |
388 | 65 | typedef struct MirOrientationEvent MirOrientationEvent; | 66 | typedef struct MirOrientationEvent MirOrientationEvent; |
389 | 66 | typedef struct MirCloseSurfaceEvent MirCloseSurfaceEvent | 67 | typedef struct MirCloseSurfaceEvent MirCloseSurfaceEvent |
391 | 67 | __attribute__ ((deprecated("use MirCloseWindowEvent instead"))); | 68 | MIR_FOR_REMOVAL_IN_VERSION_1("use MirCloseWindowEvent instead"); |
392 | 68 | typedef struct MirCloseSurfaceEvent MirCloseWindowEvent; | 69 | typedef struct MirCloseSurfaceEvent MirCloseWindowEvent; |
393 | 69 | typedef struct MirInputEvent MirInputEvent; | 70 | typedef struct MirInputEvent MirInputEvent; |
394 | 70 | typedef struct MirKeymapEvent MirKeymapEvent; | 71 | typedef struct MirKeymapEvent MirKeymapEvent; |
395 | 71 | typedef struct MirInputConfigurationEvent MirInputConfigurationEvent | 72 | typedef struct MirInputConfigurationEvent MirInputConfigurationEvent |
397 | 72 | __attribute__ ((deprecated("Use MirInputDeviceStateEvent and the MirInputConfig callback instead"))); | 73 | MIR_FOR_REMOVAL_IN_VERSION_1("Use MirInputDeviceStateEvent and the MirInputConfig callback instead"); |
398 | 73 | typedef struct MirSurfaceOutputEvent MirSurfaceOutputEvent | 74 | typedef struct MirSurfaceOutputEvent MirSurfaceOutputEvent |
400 | 74 | __attribute__ ((deprecated("use MirWindowOutputEvent instead"))); | 75 | MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowOutputEvent instead"); |
401 | 75 | typedef struct MirSurfaceOutputEvent MirWindowOutputEvent; | 76 | typedef struct MirSurfaceOutputEvent MirWindowOutputEvent; |
402 | 76 | typedef struct MirInputDeviceStateEvent MirInputDeviceStateEvent; | 77 | typedef struct MirInputDeviceStateEvent MirInputDeviceStateEvent; |
403 | 77 | typedef struct MirSurfacePlacementEvent MirSurfacePlacementEvent | 78 | typedef struct MirSurfacePlacementEvent MirSurfacePlacementEvent |
405 | 78 | __attribute__ ((deprecated("use MirWindowPlacementEvent instead"))); | 79 | MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowPlacementEvent instead"); |
406 | 79 | typedef struct MirSurfacePlacementEvent MirWindowPlacementEvent; | 80 | typedef struct MirSurfacePlacementEvent MirWindowPlacementEvent; |
407 | 80 | 81 | ||
408 | 81 | typedef struct MirCookie MirCookie; | 82 | typedef struct MirCookie MirCookie; |
409 | @@ -136,7 +137,7 @@ | |||
410 | 136 | * \return The associated MirSurfaceEvent | 137 | * \return The associated MirSurfaceEvent |
411 | 137 | */ | 138 | */ |
412 | 138 | MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* event) | 139 | MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* event) |
414 | 139 | __attribute__ ((deprecated("use mir_event_get_window_event instead"))); | 140 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_event instead"); |
415 | 140 | 141 | ||
416 | 141 | /** | 142 | /** |
417 | 142 | * Retrieve the MirWindowEvent associated with a MirEvent of | 143 | * Retrieve the MirWindowEvent associated with a MirEvent of |
418 | @@ -195,7 +196,7 @@ | |||
419 | 195 | * \return The associated MirCloseSurfaceEvent | 196 | * \return The associated MirCloseSurfaceEvent |
420 | 196 | */ | 197 | */ |
421 | 197 | /// @cond | 198 | /// @cond |
423 | 198 | __attribute__ ((deprecated)) | 199 | MIR_FOR_REMOVAL_IN_VERSION_1("Use of this function is pointless as there is no way to use the return value") |
424 | 199 | /// @endcond | 200 | /// @endcond |
425 | 200 | MirCloseSurfaceEvent const* mir_event_get_close_surface_event(MirEvent const* event); | 201 | MirCloseSurfaceEvent const* mir_event_get_close_surface_event(MirEvent const* event); |
426 | 201 | #pragma GCC diagnostic pop | 202 | #pragma GCC diagnostic pop |
427 | @@ -223,7 +224,7 @@ | |||
428 | 223 | * \return The associated MirInputConfigurationEvent | 224 | * \return The associated MirInputConfigurationEvent |
429 | 224 | */ | 225 | */ |
430 | 225 | /// @cond | 226 | /// @cond |
432 | 226 | __attribute__((deprecated)) | 227 | MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback") |
433 | 227 | /// @endcond | 228 | /// @endcond |
434 | 228 | MirInputConfigurationEvent const* mir_event_get_input_configuration_event(MirEvent const* event); | 229 | MirInputConfigurationEvent const* mir_event_get_input_configuration_event(MirEvent const* event); |
435 | 229 | #pragma GCC diagnostic pop | 230 | #pragma GCC diagnostic pop |
436 | @@ -242,7 +243,7 @@ | |||
437 | 242 | * \return The associated MirSurfaceOutputEvent | 243 | * \return The associated MirSurfaceOutputEvent |
438 | 243 | */ | 244 | */ |
439 | 244 | MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* event) | 245 | MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* event) |
441 | 245 | __attribute__((deprecated("use mir_event_get_window_output_event"))); | 246 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_output_event"); |
442 | 246 | 247 | ||
443 | 247 | /** | 248 | /** |
444 | 248 | * Retrieve the MirWindowOutputEvent associated with a MirEvent of type | 249 | * Retrieve the MirWindowOutputEvent associated with a MirEvent of type |
445 | @@ -279,7 +280,7 @@ | |||
446 | 279 | * \return The associated MirSurfacePlacementEvent | 280 | * \return The associated MirSurfacePlacementEvent |
447 | 280 | */ | 281 | */ |
448 | 281 | MirSurfacePlacementEvent const* mir_event_get_surface_placement_event(MirEvent const* event) | 282 | MirSurfacePlacementEvent const* mir_event_get_surface_placement_event(MirEvent const* event) |
450 | 282 | __attribute__((deprecated("use mir_event_get_window_placement_event"))); | 283 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_placement_event"); |
451 | 283 | 284 | ||
452 | 284 | /** | 285 | /** |
453 | 285 | * Retrieve the MirWindowPlacementEvent associated with a MirEvent of | 286 | * Retrieve the MirWindowPlacementEvent associated with a MirEvent of |
454 | 286 | 287 | ||
455 | === modified file 'include/client/mir_toolkit/events/input_configuration_event.h' | |||
456 | --- include/client/mir_toolkit/events/input_configuration_event.h 2017-01-20 16:27:50 +0000 | |||
457 | +++ include/client/mir_toolkit/events/input_configuration_event.h 2017-06-05 10:39:04 +0000 | |||
458 | @@ -20,6 +20,7 @@ | |||
459 | 20 | #define MIR_TOOLKIT_EVENTS_INPUT_CONFIGURATION_EVENT_H_ | 20 | #define MIR_TOOLKIT_EVENTS_INPUT_CONFIGURATION_EVENT_H_ |
460 | 21 | 21 | ||
461 | 22 | #include <mir_toolkit/events/event.h> | 22 | #include <mir_toolkit/events/event.h> |
462 | 23 | #include <mir_toolkit/deprecations.h> | ||
463 | 23 | 24 | ||
464 | 24 | #ifdef __cplusplus | 25 | #ifdef __cplusplus |
465 | 25 | /** | 26 | /** |
466 | @@ -45,7 +46,7 @@ | |||
467 | 45 | mir_input_configuration_action_configuration_changed, | 46 | mir_input_configuration_action_configuration_changed, |
468 | 46 | mir_input_configuration_action_device_reset | 47 | mir_input_configuration_action_device_reset |
469 | 47 | } MirInputConfigurationAction | 48 | } MirInputConfigurationAction |
471 | 48 | __attribute__((deprecated)); | 49 | MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback"); |
472 | 49 | 50 | ||
473 | 50 | #pragma GCC diagnostic push | 51 | #pragma GCC diagnostic push |
474 | 51 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 52 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
475 | @@ -55,7 +56,8 @@ | |||
476 | 55 | * \param[in] ev The input configuration event | 56 | * \param[in] ev The input configuration event |
477 | 56 | * \return The action | 57 | * \return The action |
478 | 57 | */ | 58 | */ |
480 | 58 | MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const* ev) __attribute__((deprecated)); | 59 | MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const* ev) |
481 | 60 | MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback"); | ||
482 | 59 | 61 | ||
483 | 60 | /** | 62 | /** |
484 | 61 | * Retreive the time associated with a MirInputConfiguration event | 63 | * Retreive the time associated with a MirInputConfiguration event |
485 | @@ -63,7 +65,8 @@ | |||
486 | 63 | * \param[in] ev The input configuration event | 65 | * \param[in] ev The input configuration event |
487 | 64 | * \return The time in nanoseconds since epoch | 66 | * \return The time in nanoseconds since epoch |
488 | 65 | */ | 67 | */ |
490 | 66 | int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const* ev) __attribute__((deprecated)); | 68 | int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const* ev) |
491 | 69 | MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback"); | ||
492 | 67 | 70 | ||
493 | 68 | /** | 71 | /** |
494 | 69 | * Retreive the device id associated with a MirInputConfiguration event | 72 | * Retreive the device id associated with a MirInputConfiguration event |
495 | @@ -71,7 +74,8 @@ | |||
496 | 71 | * \param[in] ev The input configuration event | 74 | * \param[in] ev The input configuration event |
497 | 72 | * \return The device id or -1 if not applicable to events of this action | 75 | * \return The device id or -1 if not applicable to events of this action |
498 | 73 | */ | 76 | */ |
500 | 74 | MirInputDeviceId mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const* ev) __attribute__((deprecated)); | 77 | MirInputDeviceId mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const* ev) |
501 | 78 | MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback"); | ||
502 | 75 | #pragma GCC diagnostic pop | 79 | #pragma GCC diagnostic pop |
503 | 76 | 80 | ||
504 | 77 | #ifdef __cplusplus | 81 | #ifdef __cplusplus |
505 | 78 | 82 | ||
506 | === modified file 'include/client/mir_toolkit/events/keymap_event.h' | |||
507 | --- include/client/mir_toolkit/events/keymap_event.h 2017-01-18 02:29:37 +0000 | |||
508 | +++ include/client/mir_toolkit/events/keymap_event.h 2017-06-05 10:39:04 +0000 | |||
509 | @@ -42,7 +42,7 @@ | |||
510 | 42 | */ | 42 | */ |
511 | 43 | void mir_keymap_event_get_rules(MirKeymapEvent const* ev, | 43 | void mir_keymap_event_get_rules(MirKeymapEvent const* ev, |
512 | 44 | struct xkb_rule_names* rules) | 44 | struct xkb_rule_names* rules) |
514 | 45 | __attribute__ ((deprecated)); | 45 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_keymap_event_get_keymap_buffer() instead"); |
515 | 46 | 46 | ||
516 | 47 | /** | 47 | /** |
517 | 48 | * Retrieve the new keymap reported by this MirKeymapEvent | 48 | * Retrieve the new keymap reported by this MirKeymapEvent |
518 | 49 | 49 | ||
519 | === modified file 'include/client/mir_toolkit/events/surface_event.h' | |||
520 | --- include/client/mir_toolkit/events/surface_event.h 2017-01-23 03:38:33 +0000 | |||
521 | +++ include/client/mir_toolkit/events/surface_event.h 2017-06-05 10:39:04 +0000 | |||
522 | @@ -20,6 +20,7 @@ | |||
523 | 20 | #define MIR_TOOLKIT_EVENTS_SURFACE_EVENT_H_ | 20 | #define MIR_TOOLKIT_EVENTS_SURFACE_EVENT_H_ |
524 | 21 | 21 | ||
525 | 22 | #include <mir_toolkit/events/event.h> | 22 | #include <mir_toolkit/events/event.h> |
526 | 23 | #include <mir_toolkit/deprecations.h> | ||
527 | 23 | 24 | ||
528 | 24 | #ifdef __cplusplus | 25 | #ifdef __cplusplus |
529 | 25 | /** | 26 | /** |
530 | @@ -39,7 +40,7 @@ | |||
531 | 39 | * \return The associated attribute | 40 | * \return The associated attribute |
532 | 40 | */ | 41 | */ |
533 | 41 | MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* event) | 42 | MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* event) |
535 | 42 | __attribute__ ((deprecated("use mir_window_event_get_attribute instead"))); | 43 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_event_get_attribute instead"); |
536 | 43 | 44 | ||
537 | 44 | /** | 45 | /** |
538 | 45 | * Retrieve the new value of the associated attribute for a given MirSurfaceEvent | 46 | * Retrieve the new value of the associated attribute for a given MirSurfaceEvent |
539 | @@ -48,7 +49,7 @@ | |||
540 | 48 | * \return The associated attribute value | 49 | * \return The associated attribute value |
541 | 49 | */ | 50 | */ |
542 | 50 | int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event) | 51 | int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event) |
544 | 51 | __attribute__ ((deprecated("use make_event with mir_window_event_get_attribute_value instead"))); | 52 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_event_get_attribute_value with MirWindowEvent instead"); |
545 | 52 | #pragma GCC diagnostic pop | 53 | #pragma GCC diagnostic pop |
546 | 53 | 54 | ||
547 | 54 | #ifdef __cplusplus | 55 | #ifdef __cplusplus |
548 | 55 | 56 | ||
549 | === modified file 'include/client/mir_toolkit/events/surface_output_event.h' | |||
550 | --- include/client/mir_toolkit/events/surface_output_event.h 2017-01-23 03:38:33 +0000 | |||
551 | +++ include/client/mir_toolkit/events/surface_output_event.h 2017-06-05 10:39:04 +0000 | |||
552 | @@ -20,6 +20,7 @@ | |||
553 | 20 | #define MIR_TOOLKIT_SURFACE_OUTPUT_EVENT_H_ | 20 | #define MIR_TOOLKIT_SURFACE_OUTPUT_EVENT_H_ |
554 | 21 | 21 | ||
555 | 22 | #include <mir_toolkit/events/event.h> | 22 | #include <mir_toolkit/events/event.h> |
556 | 23 | #include <mir_toolkit/deprecations.h> | ||
557 | 23 | 24 | ||
558 | 24 | #ifdef __cplusplus | 25 | #ifdef __cplusplus |
559 | 25 | /** | 26 | /** |
560 | @@ -39,7 +40,7 @@ | |||
561 | 39 | * \return The new DPI value for the surface is primarily on. | 40 | * \return The new DPI value for the surface is primarily on. |
562 | 40 | */ | 41 | */ |
563 | 41 | int mir_surface_output_event_get_dpi(MirSurfaceOutputEvent const* ev) | 42 | int mir_surface_output_event_get_dpi(MirSurfaceOutputEvent const* ev) |
565 | 42 | __attribute__ ((deprecated("use mir_window_output_event_get_dpi instead"))); | 43 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_dpi instead"); |
566 | 43 | 44 | ||
567 | 44 | /** | 45 | /** |
568 | 45 | * Retrieve the form factor of the new output configuration of a MirSurfaceOutputEvent | 46 | * Retrieve the form factor of the new output configuration of a MirSurfaceOutputEvent |
569 | @@ -48,7 +49,7 @@ | |||
570 | 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. |
571 | 49 | */ | 50 | */ |
572 | 50 | MirFormFactor mir_surface_output_event_get_form_factor(MirSurfaceOutputEvent const* ev) | 51 | MirFormFactor mir_surface_output_event_get_form_factor(MirSurfaceOutputEvent const* ev) |
574 | 51 | __attribute__ ((deprecated("use mir_window_output_event_get_form_factor instead"))); | 52 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_form_factor instead"); |
575 | 52 | 53 | ||
576 | 53 | /** | 54 | /** |
577 | 54 | * Retrieve the suggested scaling factor of the new output configuration of a | 55 | * Retrieve the suggested scaling factor of the new output configuration of a |
578 | @@ -58,7 +59,7 @@ | |||
579 | 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. |
580 | 59 | */ | 60 | */ |
581 | 60 | float mir_surface_output_event_get_scale(MirSurfaceOutputEvent const* ev) | 61 | float mir_surface_output_event_get_scale(MirSurfaceOutputEvent const* ev) |
583 | 61 | __attribute__ ((deprecated("use mir_window_output_event_get_scale instead"))); | 62 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_scale instead"); |
584 | 62 | 63 | ||
585 | 63 | /** | 64 | /** |
586 | 64 | * Retrieve the maximum refresh rate of the output(s) associated with a | 65 | * Retrieve the maximum refresh rate of the output(s) associated with a |
587 | @@ -70,7 +71,7 @@ | |||
588 | 70 | * \return The refresh rate in Hz | 71 | * \return The refresh rate in Hz |
589 | 71 | */ | 72 | */ |
590 | 72 | double mir_surface_output_event_get_refresh_rate(MirSurfaceOutputEvent const* ev) | 73 | double mir_surface_output_event_get_refresh_rate(MirSurfaceOutputEvent const* ev) |
592 | 73 | __attribute__ ((deprecated("use mir_window_output_event_get_refresh_rate instead"))); | 74 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_refresh_rate instead"); |
593 | 74 | 75 | ||
594 | 75 | /** | 76 | /** |
595 | 76 | * Retrieve the ID of the output this surface is on from a MirSurfaceOutputEvent | 77 | * Retrieve the ID of the output this surface is on from a MirSurfaceOutputEvent |
596 | @@ -80,7 +81,7 @@ | |||
597 | 80 | * (From MirDisplayOutput::output_id) | 81 | * (From MirDisplayOutput::output_id) |
598 | 81 | */ | 82 | */ |
599 | 82 | uint32_t mir_surface_output_event_get_output_id(MirSurfaceOutputEvent const *ev) | 83 | uint32_t mir_surface_output_event_get_output_id(MirSurfaceOutputEvent const *ev) |
601 | 83 | __attribute__ ((deprecated("use mir_window_output_event_get_output_id instead"))); | 84 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_output_id instead"); |
602 | 84 | 85 | ||
603 | 85 | #pragma GCC diagnostic pop | 86 | #pragma GCC diagnostic pop |
604 | 86 | 87 | ||
605 | 87 | 88 | ||
606 | === modified file 'include/client/mir_toolkit/events/surface_placement.h' | |||
607 | --- include/client/mir_toolkit/events/surface_placement.h 2017-01-19 05:30:03 +0000 | |||
608 | +++ include/client/mir_toolkit/events/surface_placement.h 2017-06-05 10:39:04 +0000 | |||
609 | @@ -20,6 +20,7 @@ | |||
610 | 20 | #define MIR_TOOLKIT_SURFACE_PLACEMENT_H_ | 20 | #define MIR_TOOLKIT_SURFACE_PLACEMENT_H_ |
611 | 21 | 21 | ||
612 | 22 | #include <mir_toolkit/client_types.h> | 22 | #include <mir_toolkit/client_types.h> |
613 | 23 | #include <mir_toolkit/deprecations.h> | ||
614 | 23 | 24 | ||
615 | 24 | #ifdef __cplusplus | 25 | #ifdef __cplusplus |
616 | 25 | /** | 26 | /** |
617 | @@ -38,7 +39,7 @@ | |||
618 | 38 | * \return The position relative to the parent surface | 39 | * \return The position relative to the parent surface |
619 | 39 | */ | 40 | */ |
620 | 40 | MirRectangle mir_surface_placement_get_relative_position(MirSurfacePlacementEvent const* event) | 41 | MirRectangle mir_surface_placement_get_relative_position(MirSurfacePlacementEvent const* event) |
622 | 41 | __attribute__ ((deprecated("use mir_window_placement_get_relative_position instead"))); | 42 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_placement_get_relative_position instead"); |
623 | 42 | 43 | ||
624 | 43 | #ifdef __cplusplus | 44 | #ifdef __cplusplus |
625 | 44 | } | 45 | } |
626 | 45 | 46 | ||
627 | === modified file 'include/client/mir_toolkit/mir_blob.h' | |||
628 | --- include/client/mir_toolkit/mir_blob.h 2017-01-19 05:30:03 +0000 | |||
629 | +++ include/client/mir_toolkit/mir_blob.h 2017-06-05 10:39:04 +0000 | |||
630 | @@ -19,6 +19,7 @@ | |||
631 | 19 | #define MIR_TOOLKIT_MIR_BLOB_H_ | 19 | #define MIR_TOOLKIT_MIR_BLOB_H_ |
632 | 20 | 20 | ||
633 | 21 | #include <mir_toolkit/client_types.h> | 21 | #include <mir_toolkit/client_types.h> |
634 | 22 | #include <mir_toolkit/deprecations.h> | ||
635 | 22 | 23 | ||
636 | 23 | #ifdef __cplusplus | 24 | #ifdef __cplusplus |
637 | 24 | /** | 25 | /** |
638 | @@ -35,7 +36,7 @@ | |||
639 | 35 | * \return A blob | 36 | * \return A blob |
640 | 36 | */ | 37 | */ |
641 | 37 | MirBlob* mir_blob_from_display_configuration(MirDisplayConfiguration* configuration) | 38 | MirBlob* mir_blob_from_display_configuration(MirDisplayConfiguration* configuration) |
643 | 38 | __attribute__ ((deprecated("use mir_blob_from_display_config instead"))); | 39 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_blob_from_display_config instead"); |
644 | 39 | 40 | ||
645 | 40 | /** | 41 | /** |
646 | 41 | * Create a blob from a display config | 42 | * Create a blob from a display config |
647 | @@ -65,7 +66,7 @@ | |||
648 | 65 | * \return A display configuration | 66 | * \return A display configuration |
649 | 66 | */ | 67 | */ |
650 | 67 | MirDisplayConfiguration* mir_blob_to_display_configuration(MirBlob* blob) | 68 | MirDisplayConfiguration* mir_blob_to_display_configuration(MirBlob* blob) |
652 | 68 | __attribute__ ((deprecated("use mir_blob_to_display_config instead"))); | 69 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_blob_to_display_config instead"); |
653 | 69 | 70 | ||
654 | 70 | /** | 71 | /** |
655 | 71 | * Create a blob from a display config | 72 | * Create a blob from a display config |
656 | 72 | 73 | ||
657 | === modified file 'include/client/mir_toolkit/mir_buffer_stream.h' | |||
658 | --- include/client/mir_toolkit/mir_buffer_stream.h 2017-01-24 07:49:13 +0000 | |||
659 | +++ include/client/mir_toolkit/mir_buffer_stream.h 2017-06-05 10:39:04 +0000 | |||
660 | @@ -20,6 +20,7 @@ | |||
661 | 20 | 20 | ||
662 | 21 | #include <mir_toolkit/mir_native_buffer.h> | 21 | #include <mir_toolkit/mir_native_buffer.h> |
663 | 22 | #include <mir_toolkit/client_types.h> | 22 | #include <mir_toolkit/client_types.h> |
664 | 23 | #include <mir_toolkit/deprecations.h> | ||
665 | 23 | 24 | ||
666 | 24 | #ifdef __cplusplus | 25 | #ifdef __cplusplus |
667 | 25 | /** | 26 | /** |
668 | @@ -141,7 +142,8 @@ | |||
669 | 141 | * mir_platform_type_gbm | 142 | * mir_platform_type_gbm |
670 | 142 | */ | 143 | */ |
671 | 143 | /// @cond | 144 | /// @cond |
673 | 144 | __attribute__ ((deprecated)) | 145 | MIR_FOR_REMOVAL_IN_VERSION_1("To identify the graphics platform use mir_connection_get_graphics_module(). \n" |
674 | 146 | "To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region()") | ||
675 | 145 | /// @endcond | 147 | /// @endcond |
676 | 146 | MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream); | 148 | MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream); |
677 | 147 | 149 | ||
678 | 148 | 150 | ||
679 | === modified file 'include/client/mir_toolkit/mir_connection.h' | |||
680 | --- include/client/mir_toolkit/mir_connection.h 2017-01-24 19:53:45 +0000 | |||
681 | +++ include/client/mir_toolkit/mir_connection.h 2017-06-05 10:39:04 +0000 | |||
682 | @@ -20,6 +20,7 @@ | |||
683 | 20 | 20 | ||
684 | 21 | #include <mir_toolkit/client_types.h> | 21 | #include <mir_toolkit/client_types.h> |
685 | 22 | #include <mir_toolkit/common.h> | 22 | #include <mir_toolkit/common.h> |
686 | 23 | #include <mir_toolkit/deprecations.h> | ||
687 | 23 | 24 | ||
688 | 24 | #include <stdbool.h> | 25 | #include <stdbool.h> |
689 | 25 | 26 | ||
690 | @@ -93,7 +94,7 @@ | |||
691 | 93 | * \param [out] platform_package Structure to be populated | 94 | * \param [out] platform_package Structure to be populated |
692 | 94 | */ | 95 | */ |
693 | 95 | void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package) | 96 | void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package) |
695 | 96 | __attribute__((deprecated("use platform extensions instead"))); | 97 | MIR_FOR_REMOVAL_IN_VERSION_1("use platform extensions instead"); |
696 | 97 | 98 | ||
697 | 98 | /** | 99 | /** |
698 | 99 | * Query graphics platform module. | 100 | * Query graphics platform module. |
699 | @@ -105,7 +106,7 @@ | |||
700 | 105 | * \param [out] properties Structure to be populated | 106 | * \param [out] properties Structure to be populated |
701 | 106 | */ | 107 | */ |
702 | 107 | void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties) | 108 | void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties) |
704 | 108 | __attribute__((deprecated("use graphics module extension instead"))); | 109 | MIR_FOR_REMOVAL_IN_VERSION_1("use graphics module extension instead"); |
705 | 109 | 110 | ||
706 | 110 | /** | 111 | /** |
707 | 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. |
708 | @@ -156,7 +157,7 @@ | |||
709 | 156 | * \return structure that describes the display configuration | 157 | * \return structure that describes the display configuration |
710 | 157 | */ | 158 | */ |
711 | 158 | MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection) | 159 | MirDisplayConfiguration* mir_connection_create_display_config(MirConnection *connection) |
713 | 159 | __attribute__ ((deprecated("use mir_connection_create_display_configuration instead"))); | 160 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_create_display_configuration instead"); |
714 | 160 | 161 | ||
715 | 161 | /** | 162 | /** |
716 | 162 | * Query the display | 163 | * Query the display |
717 | @@ -188,7 +189,7 @@ | |||
718 | 188 | * \param [in] display_configuration The display_configuration information resource to be destroyed | 189 | * \param [in] display_configuration The display_configuration information resource to be destroyed |
719 | 189 | */ | 190 | */ |
720 | 190 | void mir_display_config_destroy(MirDisplayConfiguration* display_configuration) | 191 | void mir_display_config_destroy(MirDisplayConfiguration* display_configuration) |
722 | 191 | __attribute__ ((deprecated("use mir_display_config_release instead"))); | 192 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_display_config_release instead"); |
723 | 192 | 193 | ||
724 | 193 | /** | 194 | /** |
725 | 194 | * Apply the display configuration | 195 | * Apply the display configuration |
726 | @@ -204,7 +205,7 @@ | |||
727 | 204 | * \return A handle that can be passed to mir_wait_for | 205 | * \return A handle that can be passed to mir_wait_for |
728 | 205 | */ | 206 | */ |
729 | 206 | MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration) | 207 | MirWaitHandle* mir_connection_apply_display_config(MirConnection *connection, MirDisplayConfiguration* display_configuration) |
731 | 207 | __attribute__ ((deprecated("use mir_connection_apply_session_display_config instead"))); | 208 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_apply_session_display_config instead"); |
732 | 208 | 209 | ||
733 | 209 | /** | 210 | /** |
734 | 210 | * Apply the display config for the connection | 211 | * Apply the display config for the connection |
735 | @@ -254,7 +255,7 @@ | |||
736 | 254 | MirWaitHandle* mir_connection_set_base_display_config( | 255 | MirWaitHandle* mir_connection_set_base_display_config( |
737 | 255 | MirConnection* connection, | 256 | MirConnection* connection, |
738 | 256 | MirDisplayConfiguration const* display_configuration) | 257 | MirDisplayConfiguration const* display_configuration) |
740 | 257 | __attribute__ ((deprecated("use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration"))); | 258 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration"); |
741 | 258 | 259 | ||
742 | 259 | 260 | ||
743 | 260 | /** | 261 | /** |
744 | @@ -379,7 +380,7 @@ | |||
745 | 379 | MirConnection* connection, | 380 | MirConnection* connection, |
746 | 380 | MirPlatformMessage const* request, | 381 | MirPlatformMessage const* request, |
747 | 381 | MirPlatformOperationCallback callback, void* context) | 382 | MirPlatformOperationCallback callback, void* context) |
749 | 382 | __attribute__ ((deprecated("use platform specific extensions instead"))); | 383 | MIR_FOR_REMOVAL_IN_VERSION_1("use platform specific extensions instead"); |
750 | 383 | 384 | ||
751 | 384 | /** | 385 | /** |
752 | 385 | * Create a snapshot of the attached input devices and device configurations. | 386 | * Create a snapshot of the attached input devices and device configurations. |
753 | @@ -399,7 +400,7 @@ | |||
754 | 399 | * \param [in] config The input configuration | 400 | * \param [in] config The input configuration |
755 | 400 | */ | 401 | */ |
756 | 401 | void mir_input_config_destroy(MirInputConfig const* config) | 402 | void mir_input_config_destroy(MirInputConfig const* config) |
758 | 402 | __attribute__ ((deprecated("use mir_input_config_release instead"))); | 403 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_input_config_release instead"); |
759 | 403 | 404 | ||
760 | 404 | /** | 405 | /** |
761 | 405 | * Release this snapshot of the input configuration. | 406 | * Release this snapshot of the input configuration. |
762 | 406 | 407 | ||
763 | === modified file 'include/client/mir_toolkit/mir_cursor_configuration.h' | |||
764 | --- include/client/mir_toolkit/mir_cursor_configuration.h 2017-01-18 02:29:37 +0000 | |||
765 | +++ include/client/mir_toolkit/mir_cursor_configuration.h 2017-06-05 10:39:04 +0000 | |||
766 | @@ -20,6 +20,7 @@ | |||
767 | 20 | 20 | ||
768 | 21 | #include <mir_toolkit/common.h> | 21 | #include <mir_toolkit/common.h> |
769 | 22 | #include <mir_toolkit/client_types.h> | 22 | #include <mir_toolkit/client_types.h> |
770 | 23 | #include <mir_toolkit/deprecations.h> | ||
771 | 23 | 24 | ||
772 | 24 | /** | 25 | /** |
773 | 25 | * Opaque structure containing cursor parameterization. Create with mir_cursor* family. | 26 | * Opaque structure containing cursor parameterization. Create with mir_cursor* family. |
774 | @@ -53,7 +54,7 @@ | |||
775 | 53 | * to_mir_cursor_configuration_destroy | 54 | * to_mir_cursor_configuration_destroy |
776 | 54 | */ | 55 | */ |
777 | 55 | /// @cond | 56 | /// @cond |
779 | 56 | __attribute__ ((deprecated)) | 57 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_cursor_name()") |
780 | 57 | /// @endcond | 58 | /// @endcond |
781 | 58 | MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name); | 59 | MirCursorConfiguration *mir_cursor_configuration_from_name(char const* name); |
782 | 59 | 60 | ||
783 | 60 | 61 | ||
784 | === modified file 'include/client/mir_toolkit/mir_display_configuration.h' | |||
785 | --- include/client/mir_toolkit/mir_display_configuration.h 2017-02-20 05:36:21 +0000 | |||
786 | +++ include/client/mir_toolkit/mir_display_configuration.h 2017-06-05 10:39:04 +0000 | |||
787 | @@ -20,6 +20,7 @@ | |||
788 | 20 | #define MIR_TOOLKIT_MIR_DISPLAY_CONFIGURATION_H_ | 20 | #define MIR_TOOLKIT_MIR_DISPLAY_CONFIGURATION_H_ |
789 | 21 | 21 | ||
790 | 22 | #include "client_types.h" | 22 | #include "client_types.h" |
791 | 23 | #include <mir_toolkit/deprecations.h> | ||
792 | 23 | 24 | ||
793 | 24 | #ifdef __cplusplus | 25 | #ifdef __cplusplus |
794 | 25 | extern "C" { | 26 | extern "C" { |
795 | @@ -60,7 +61,7 @@ | |||
796 | 60 | */ | 61 | */ |
797 | 61 | int mir_display_config_get_max_simultaneous_outputs( | 62 | int mir_display_config_get_max_simultaneous_outputs( |
798 | 62 | MirDisplayConfig const* config) | 63 | MirDisplayConfig const* config) |
800 | 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."); |
801 | 64 | 65 | ||
802 | 65 | /** | 66 | /** |
803 | 66 | * Get the number of outputs available in this display configuration. | 67 | * Get the number of outputs available in this display configuration. |
804 | @@ -268,7 +269,7 @@ | |||
805 | 268 | * \returns The name of the output type. | 269 | * \returns The name of the output type. |
806 | 269 | */ | 270 | */ |
807 | 270 | char const* mir_display_output_type_name(MirDisplayOutputType type) | 271 | char const* mir_display_output_type_name(MirDisplayOutputType type) |
809 | 271 | __attribute__((deprecated("use mir_output_type_name instead"))); | 272 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_output_type_name instead"); |
810 | 272 | 273 | ||
811 | 273 | /** | 274 | /** |
812 | 274 | * Get the textual name of an output type. | 275 | * Get the textual name of an output type. |
813 | 275 | 276 | ||
814 | === modified file 'include/client/mir_toolkit/mir_persistent_id.h' | |||
815 | --- include/client/mir_toolkit/mir_persistent_id.h 2017-02-02 19:52:04 +0000 | |||
816 | +++ include/client/mir_toolkit/mir_persistent_id.h 2017-06-05 10:39:04 +0000 | |||
817 | @@ -19,6 +19,7 @@ | |||
818 | 19 | #define MIR_TOOLKIT_MIR_PERSISTENT_ID_H_ | 19 | #define MIR_TOOLKIT_MIR_PERSISTENT_ID_H_ |
819 | 20 | 20 | ||
820 | 21 | #include <mir_toolkit/client_types.h> | 21 | #include <mir_toolkit/client_types.h> |
821 | 22 | #include <mir_toolkit/deprecations.h> | ||
822 | 22 | 23 | ||
823 | 23 | #include <stdbool.h> | 24 | #include <stdbool.h> |
824 | 24 | 25 | ||
825 | @@ -39,7 +40,7 @@ | |||
826 | 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. |
827 | 40 | */ | 41 | */ |
828 | 41 | bool mir_persistent_id_is_valid(MirPersistentId* id) | 42 | bool mir_persistent_id_is_valid(MirPersistentId* id) |
830 | 42 | __attribute__((deprecated("Use mir_window_id_is_valid() instead"))); | 43 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_is_valid() instead"); |
831 | 43 | 44 | ||
832 | 44 | /** | 45 | /** |
833 | 45 | * \brief Free a MirPersistentId | 46 | * \brief Free a MirPersistentId |
834 | @@ -48,7 +49,7 @@ | |||
835 | 48 | * object referred to by \arg id. | 49 | * object referred to by \arg id. |
836 | 49 | */ | 50 | */ |
837 | 50 | void mir_persistent_id_release(MirPersistentId* id) | 51 | void mir_persistent_id_release(MirPersistentId* id) |
839 | 51 | __attribute__((deprecated("Use mir_window_id_release() instead"))); | 52 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_release() instead"); |
840 | 52 | 53 | ||
841 | 53 | /** | 54 | /** |
842 | 54 | * \brief Get a string representation of a MirSurfaceId | 55 | * \brief Get a string representation of a MirSurfaceId |
843 | @@ -59,7 +60,7 @@ | |||
844 | 59 | * \see mir_surface_id_from_string | 60 | * \see mir_surface_id_from_string |
845 | 60 | */ | 61 | */ |
846 | 61 | char const* mir_persistent_id_as_string(MirPersistentId* id) | 62 | char const* mir_persistent_id_as_string(MirPersistentId* id) |
848 | 62 | __attribute__((deprecated("Use mir_window_id_as_string() instead"))); | 63 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_as_string() instead"); |
849 | 63 | 64 | ||
850 | 64 | /** | 65 | /** |
851 | 65 | * \brief Deserialise a string representation of a MirSurfaceId | 66 | * \brief Deserialise a string representation of a MirSurfaceId |
852 | @@ -67,7 +68,7 @@ | |||
853 | 67 | * \return The deserialised MirSurfaceId | 68 | * \return The deserialised MirSurfaceId |
854 | 68 | */ | 69 | */ |
855 | 69 | MirPersistentId* mir_persistent_id_from_string(char const* string_representation) | 70 | MirPersistentId* mir_persistent_id_from_string(char const* string_representation) |
857 | 70 | __attribute__((deprecated("Use mir_window_id_from_string() instead"))); | 71 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_from_string() instead"); |
858 | 71 | 72 | ||
859 | 72 | #pragma GCC diagnostic pop | 73 | #pragma GCC diagnostic pop |
860 | 73 | 74 | ||
861 | 74 | 75 | ||
862 | === modified file 'include/client/mir_toolkit/mir_platform_message.h' | |||
863 | --- include/client/mir_toolkit/mir_platform_message.h 2017-01-18 02:29:37 +0000 | |||
864 | +++ include/client/mir_toolkit/mir_platform_message.h 2017-06-05 10:39:04 +0000 | |||
865 | @@ -19,6 +19,7 @@ | |||
866 | 19 | #define MIR_TOOLKIT_MIR_PLATFORM_MESSAGE_H_ | 19 | #define MIR_TOOLKIT_MIR_PLATFORM_MESSAGE_H_ |
867 | 20 | 20 | ||
868 | 21 | #include <sys/types.h> | 21 | #include <sys/types.h> |
869 | 22 | #include <mir_toolkit/deprecations.h> | ||
870 | 22 | 23 | ||
871 | 23 | #ifdef __cplusplus | 24 | #ifdef __cplusplus |
872 | 24 | /** | 25 | /** |
873 | @@ -51,7 +52,7 @@ | |||
874 | 51 | * \param [in] opcode The platform message opcode | 52 | * \param [in] opcode The platform message opcode |
875 | 52 | * \return The created MirPlatformMessage | 53 | * \return The created MirPlatformMessage |
876 | 53 | */ | 54 | */ |
878 | 54 | __attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device"))) | 55 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device") |
879 | 55 | MirPlatformMessage* mir_platform_message_create(unsigned int opcode); | 56 | MirPlatformMessage* mir_platform_message_create(unsigned int opcode); |
880 | 56 | 57 | ||
881 | 57 | /** | 58 | /** |
882 | @@ -59,7 +60,7 @@ | |||
883 | 59 | * | 60 | * |
884 | 60 | * \param [in] message The MirPlatformMessage | 61 | * \param [in] message The MirPlatformMessage |
885 | 61 | */ | 62 | */ |
887 | 62 | __attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device"))) | 63 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device") |
888 | 63 | void mir_platform_message_release(MirPlatformMessage const* message); | 64 | void mir_platform_message_release(MirPlatformMessage const* message); |
889 | 64 | 65 | ||
890 | 65 | /** | 66 | /** |
891 | @@ -71,7 +72,7 @@ | |||
892 | 71 | * \param [in] data Pointer to the data | 72 | * \param [in] data Pointer to the data |
893 | 72 | * \param [in] data_size The size of the data in bytes | 73 | * \param [in] data_size The size of the data in bytes |
894 | 73 | */ | 74 | */ |
896 | 74 | __attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device"))) | 75 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device") |
897 | 75 | void mir_platform_message_set_data(MirPlatformMessage* message, void const* data, size_t data_size); | 76 | void mir_platform_message_set_data(MirPlatformMessage* message, void const* data, size_t data_size); |
898 | 76 | 77 | ||
899 | 77 | /** | 78 | /** |
900 | @@ -89,7 +90,7 @@ | |||
901 | 89 | * \param [in] fds Pointer to the array of fds | 90 | * \param [in] fds Pointer to the array of fds |
902 | 90 | * \param [in] num_fds The number of fds | 91 | * \param [in] num_fds The number of fds |
903 | 91 | */ | 92 | */ |
905 | 92 | __attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device"))) | 93 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device") |
906 | 93 | void mir_platform_message_set_fds(MirPlatformMessage* message, int const* fds, size_t num_fds); | 94 | void mir_platform_message_set_fds(MirPlatformMessage* message, int const* fds, size_t num_fds); |
907 | 94 | 95 | ||
908 | 95 | /** | 96 | /** |
909 | @@ -98,7 +99,7 @@ | |||
910 | 98 | * \param [in] message The MirPlatformMessage | 99 | * \param [in] message The MirPlatformMessage |
911 | 99 | * \return The opcode | 100 | * \return The opcode |
912 | 100 | */ | 101 | */ |
914 | 101 | __attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device"))) | 102 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device") |
915 | 102 | unsigned int mir_platform_message_get_opcode(MirPlatformMessage const* message); | 103 | unsigned int mir_platform_message_get_opcode(MirPlatformMessage const* message); |
916 | 103 | 104 | ||
917 | 104 | /** | 105 | /** |
918 | @@ -111,7 +112,7 @@ | |||
919 | 111 | * \param [in] message The MirPlatformMessage | 112 | * \param [in] message The MirPlatformMessage |
920 | 112 | * \return The data | 113 | * \return The data |
921 | 113 | */ | 114 | */ |
923 | 114 | __attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device"))) | 115 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device") |
924 | 115 | MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const* message); | 116 | MirPlatformMessageData mir_platform_message_get_data(MirPlatformMessage const* message); |
925 | 116 | 117 | ||
926 | 117 | /** | 118 | /** |
927 | @@ -128,7 +129,7 @@ | |||
928 | 128 | * \param [in] message The MirPlatformMessage | 129 | * \param [in] message The MirPlatformMessage |
929 | 129 | * \return The fds | 130 | * \return The fds |
930 | 130 | */ | 131 | */ |
932 | 131 | __attribute__((deprecated("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device"))) | 132 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_extension_mesa_drm_auth or mir_extension_set_gbm_device") |
933 | 132 | MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const* message); | 133 | MirPlatformMessageFds mir_platform_message_get_fds(MirPlatformMessage const* message); |
934 | 133 | 134 | ||
935 | 134 | #ifdef __cplusplus | 135 | #ifdef __cplusplus |
936 | 135 | 136 | ||
937 | === modified file 'include/client/mir_toolkit/mir_screencast.h' | |||
938 | --- include/client/mir_toolkit/mir_screencast.h 2017-01-19 05:30:03 +0000 | |||
939 | +++ include/client/mir_toolkit/mir_screencast.h 2017-06-05 10:39:04 +0000 | |||
940 | @@ -18,6 +18,7 @@ | |||
941 | 18 | #define MIR_TOOLKIT_MIR_SCREENCAST_H_ | 18 | #define MIR_TOOLKIT_MIR_SCREENCAST_H_ |
942 | 19 | 19 | ||
943 | 20 | #include <mir_toolkit/client_types.h> | 20 | #include <mir_toolkit/client_types.h> |
944 | 21 | #include <mir_toolkit/deprecations.h> | ||
945 | 21 | 22 | ||
946 | 22 | #ifdef __cplusplus | 23 | #ifdef __cplusplus |
947 | 23 | /** | 24 | /** |
948 | @@ -143,7 +144,7 @@ | |||
949 | 143 | MirScreencast* mir_connection_create_screencast_sync( | 144 | MirScreencast* mir_connection_create_screencast_sync( |
950 | 144 | MirConnection* connection, | 145 | MirConnection* connection, |
951 | 145 | MirScreencastParameters* parameters) | 146 | MirScreencastParameters* parameters) |
953 | 146 | __attribute__ ((deprecated("use mir_screencast_create_sync instead"))); | 147 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_screencast_create_sync instead"); |
954 | 147 | 148 | ||
955 | 148 | /** | 149 | /** |
956 | 149 | * Release the specified screencast. | 150 | * Release the specified screencast. |
957 | 150 | 151 | ||
958 | === modified file 'include/client/mir_toolkit/mir_surface.h' | |||
959 | --- include/client/mir_toolkit/mir_surface.h 2017-01-24 11:06:35 +0000 | |||
960 | +++ include/client/mir_toolkit/mir_surface.h 2017-06-05 10:39:04 +0000 | |||
961 | @@ -22,6 +22,7 @@ | |||
962 | 22 | #include <mir_toolkit/client_types.h> | 22 | #include <mir_toolkit/client_types.h> |
963 | 23 | #include <mir_toolkit/common.h> | 23 | #include <mir_toolkit/common.h> |
964 | 24 | #include <mir_toolkit/mir_cursor_configuration.h> | 24 | #include <mir_toolkit/mir_cursor_configuration.h> |
965 | 25 | #include <mir_toolkit/deprecations.h> | ||
966 | 25 | 26 | ||
967 | 26 | #include <stdbool.h> | 27 | #include <stdbool.h> |
968 | 27 | 28 | ||
969 | @@ -40,7 +41,7 @@ | |||
970 | 40 | MirSurfaceSpec* mir_connection_create_spec_for_normal_surface(MirConnection* connection, | 41 | MirSurfaceSpec* mir_connection_create_spec_for_normal_surface(MirConnection* connection, |
971 | 41 | int width, int height, | 42 | int width, int height, |
972 | 42 | MirPixelFormat format) | 43 | MirPixelFormat format) |
974 | 43 | __attribute__((deprecated("Use mir_create_normal_window_spec() instead"))); | 44 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_normal_window_spec() instead"); |
975 | 44 | 45 | ||
976 | 45 | MirSurfaceSpec* | 46 | MirSurfaceSpec* |
977 | 46 | mir_connection_create_spec_for_menu(MirConnection* connection, | 47 | mir_connection_create_spec_for_menu(MirConnection* connection, |
978 | @@ -50,7 +51,7 @@ | |||
979 | 50 | MirSurface* parent, | 51 | MirSurface* parent, |
980 | 51 | MirRectangle* rect, | 52 | MirRectangle* rect, |
981 | 52 | MirEdgeAttachment edge) | 53 | MirEdgeAttachment edge) |
983 | 53 | __attribute__((deprecated("Use mir_specify_menu() instead"))); | 54 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_specify_menu() instead"); |
984 | 54 | 55 | ||
985 | 55 | MirSurfaceSpec* | 56 | MirSurfaceSpec* |
986 | 56 | mir_connection_create_spec_for_tooltip(MirConnection* connection, | 57 | mir_connection_create_spec_for_tooltip(MirConnection* connection, |
987 | @@ -58,7 +59,7 @@ | |||
988 | 58 | MirPixelFormat format, | 59 | MirPixelFormat format, |
989 | 59 | MirSurface* parent, | 60 | MirSurface* parent, |
990 | 60 | MirRectangle* zone) | 61 | MirRectangle* zone) |
992 | 61 | __attribute__((deprecated("Use mir_create_tip_window_spec() instead"))); | 62 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_tip_window_spec() instead"); |
993 | 62 | 63 | ||
994 | 63 | MirSurfaceSpec* | 64 | MirSurfaceSpec* |
995 | 64 | mir_connection_create_spec_for_tip(MirConnection* connection, | 65 | mir_connection_create_spec_for_tip(MirConnection* connection, |
996 | @@ -67,30 +68,30 @@ | |||
997 | 67 | MirSurface* parent, | 68 | MirSurface* parent, |
998 | 68 | MirRectangle* rect, | 69 | MirRectangle* rect, |
999 | 69 | MirEdgeAttachment edge) | 70 | MirEdgeAttachment edge) |
1001 | 70 | __attribute__((deprecated("Use mir_create_tip_window_spec() instead"))); | 71 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_tip_window_spec() instead"); |
1002 | 71 | 72 | ||
1003 | 72 | MirSurfaceSpec* | 73 | MirSurfaceSpec* |
1004 | 73 | mir_connection_create_spec_for_modal_dialog(MirConnection* connection, | 74 | mir_connection_create_spec_for_modal_dialog(MirConnection* connection, |
1005 | 74 | int width, int height, | 75 | int width, int height, |
1006 | 75 | MirPixelFormat format, | 76 | MirPixelFormat format, |
1007 | 76 | MirSurface* parent) | 77 | MirSurface* parent) |
1009 | 77 | __attribute__((deprecated("Use mir_create_modal_dialog_window_spec() instead"))); | 78 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_modal_dialog_window_spec() instead"); |
1010 | 78 | 79 | ||
1011 | 79 | MirSurfaceSpec* | 80 | MirSurfaceSpec* |
1012 | 80 | mir_connection_create_spec_for_dialog(MirConnection* connection, | 81 | mir_connection_create_spec_for_dialog(MirConnection* connection, |
1013 | 81 | int width, int height, | 82 | int width, int height, |
1014 | 82 | MirPixelFormat format) | 83 | MirPixelFormat format) |
1016 | 83 | __attribute__((deprecated("Use mir_create_dialog_window_spec() instead"))); | 84 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_dialog_window_spec() instead"); |
1017 | 84 | 85 | ||
1018 | 85 | MirSurfaceSpec* mir_create_surface_spec(MirConnection* connection) | 86 | MirSurfaceSpec* mir_create_surface_spec(MirConnection* connection) |
1020 | 86 | __attribute__((deprecated("Use mir_create_window_spec() instead"))); | 87 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_window_spec() instead"); |
1021 | 87 | 88 | ||
1022 | 88 | MirSurfaceSpec* | 89 | MirSurfaceSpec* |
1023 | 89 | mir_connection_create_spec_for_changes(MirConnection* connection) | 90 | mir_connection_create_spec_for_changes(MirConnection* connection) |
1025 | 90 | __attribute__((deprecated("Use mir_create_window_spec() instead"))); | 91 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_window_spec() instead"); |
1026 | 91 | 92 | ||
1027 | 92 | void mir_surface_spec_set_parent(MirSurfaceSpec* spec, MirSurface* parent) | 93 | void mir_surface_spec_set_parent(MirSurfaceSpec* spec, MirSurface* parent) |
1029 | 93 | __attribute__((deprecated("Use mir_window_spec_set_parent() instead"))); | 94 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_parent() instead"); |
1030 | 94 | 95 | ||
1031 | 95 | /** | 96 | /** |
1032 | 96 | *\deprecated This will soon be a property of the backing content. | 97 | *\deprecated This will soon be a property of the backing content. |
1033 | @@ -103,77 +104,77 @@ | |||
1034 | 103 | * was removed by use of mir_window_spec_set_streams(). | 104 | * was removed by use of mir_window_spec_set_streams(). |
1035 | 104 | */ | 105 | */ |
1036 | 105 | int mir_surface_get_swapinterval(MirSurface* surface) | 106 | int mir_surface_get_swapinterval(MirSurface* surface) |
1038 | 106 | __attribute__((deprecated("This will soon be a property of the backing content"))); | 107 | MIR_FOR_REMOVAL_IN_VERSION_1("This will soon be a property of the backing content"); |
1039 | 107 | 108 | ||
1040 | 108 | void mir_surface_spec_set_type(MirSurfaceSpec* spec, MirSurfaceType type) | 109 | void mir_surface_spec_set_type(MirSurfaceSpec* spec, MirSurfaceType type) |
1042 | 109 | __attribute__((deprecated("use mir_window_spec_set_type() instead"))); | 110 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_type() instead"); |
1043 | 110 | 111 | ||
1044 | 111 | void mir_surface_spec_set_name(MirSurfaceSpec* spec, char const* name) | 112 | void mir_surface_spec_set_name(MirSurfaceSpec* spec, char const* name) |
1046 | 112 | __attribute__((deprecated("use mir_window_spec_set_name() instead"))); | 113 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_name() instead"); |
1047 | 113 | 114 | ||
1048 | 114 | void mir_surface_spec_set_width(MirSurfaceSpec* spec, unsigned width) | 115 | void mir_surface_spec_set_width(MirSurfaceSpec* spec, unsigned width) |
1050 | 115 | __attribute__((deprecated("use mir_window_spec_set_width() instead"))); | 116 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_width() instead"); |
1051 | 116 | 117 | ||
1052 | 117 | void mir_surface_spec_set_height(MirSurfaceSpec* spec, unsigned height) | 118 | void mir_surface_spec_set_height(MirSurfaceSpec* spec, unsigned height) |
1054 | 118 | __attribute__((deprecated("use mir_window_spec_set_height() instead"))); | 119 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_height() instead"); |
1055 | 119 | 120 | ||
1056 | 120 | void mir_surface_spec_set_width_increment(MirSurfaceSpec* spec, unsigned width_inc) | 121 | void mir_surface_spec_set_width_increment(MirSurfaceSpec* spec, unsigned width_inc) |
1058 | 121 | __attribute__((deprecated("use mir_window_spec_set_width_increment() instead"))); | 122 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_width_increment() instead"); |
1059 | 122 | 123 | ||
1060 | 123 | void mir_surface_spec_set_height_increment(MirSurfaceSpec* spec, unsigned height_inc) | 124 | void mir_surface_spec_set_height_increment(MirSurfaceSpec* spec, unsigned height_inc) |
1062 | 124 | __attribute__((deprecated("use mir_window_spec_set_height_increment() instead"))); | 125 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_height_increment() instead"); |
1063 | 125 | 126 | ||
1064 | 126 | void mir_surface_spec_set_min_width(MirSurfaceSpec* spec, unsigned min_width) | 127 | void mir_surface_spec_set_min_width(MirSurfaceSpec* spec, unsigned min_width) |
1066 | 127 | __attribute__((deprecated("use mir_window_spec_set_min_width() instead"))); | 128 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_width() instead"); |
1067 | 128 | 129 | ||
1068 | 129 | void mir_surface_spec_set_min_height(MirSurfaceSpec* spec, unsigned min_height) | 130 | void mir_surface_spec_set_min_height(MirSurfaceSpec* spec, unsigned min_height) |
1070 | 130 | __attribute__((deprecated("use mir_window_spec_set_min_height() instead"))); | 131 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_height() instead"); |
1071 | 131 | 132 | ||
1072 | 132 | void mir_surface_spec_set_max_width(MirSurfaceSpec* spec, unsigned max_width) | 133 | void mir_surface_spec_set_max_width(MirSurfaceSpec* spec, unsigned max_width) |
1074 | 133 | __attribute__((deprecated("use mir_window_spec_set_max_width() instead"))); | 134 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_width() instead"); |
1075 | 134 | 135 | ||
1076 | 135 | void mir_surface_spec_set_max_height(MirSurfaceSpec* spec, unsigned max_height) | 136 | void mir_surface_spec_set_max_height(MirSurfaceSpec* spec, unsigned max_height) |
1078 | 136 | __attribute__((deprecated("use mir_window_spec_set_max_height() instead"))); | 137 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_height() instead"); |
1079 | 137 | 138 | ||
1080 | 138 | void mir_surface_spec_set_min_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height) | 139 | void mir_surface_spec_set_min_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height) |
1082 | 139 | __attribute__((deprecated("use mir_window_spec_set_min_aspect_ratio() instead"))); | 140 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_aspect_ratio() instead"); |
1083 | 140 | 141 | ||
1084 | 141 | void mir_surface_spec_set_max_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height) | 142 | void mir_surface_spec_set_max_aspect_ratio(MirSurfaceSpec* spec, unsigned width, unsigned height) |
1086 | 142 | __attribute__((deprecated("use mir_window_spec_set_max_aspect_ratio() instead"))); | 143 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_aspect_ratio() instead"); |
1087 | 143 | 144 | ||
1088 | 144 | void mir_surface_spec_set_fullscreen_on_output(MirSurfaceSpec* spec, uint32_t output_id) | 145 | void mir_surface_spec_set_fullscreen_on_output(MirSurfaceSpec* spec, uint32_t output_id) |
1090 | 145 | __attribute__((deprecated("use mir_window_spec_set_fullscreen_on_output() instead"))); | 146 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_fullscreen_on_output() instead"); |
1091 | 146 | 147 | ||
1092 | 147 | void mir_surface_spec_set_preferred_orientation(MirSurfaceSpec* spec, MirOrientationMode mode) | 148 | void mir_surface_spec_set_preferred_orientation(MirSurfaceSpec* spec, MirOrientationMode mode) |
1094 | 148 | __attribute__((deprecated("use mir_window_spec_set_preferred_orientation() instead"))); | 149 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_preferred_orientation() instead"); |
1095 | 149 | 150 | ||
1096 | 150 | bool mir_surface_spec_attach_to_foreign_parent(MirSurfaceSpec* spec, | 151 | bool mir_surface_spec_attach_to_foreign_parent(MirSurfaceSpec* spec, |
1097 | 151 | MirPersistentId* parent, | 152 | MirPersistentId* parent, |
1098 | 152 | MirRectangle* attachment_rect, | 153 | MirRectangle* attachment_rect, |
1099 | 153 | MirEdgeAttachment edge) | 154 | MirEdgeAttachment edge) |
1101 | 154 | __attribute__((deprecated("use mir_window_spec_attach_to_foreign_parent() instead"))); | 155 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_attach_to_foreign_parent() instead"); |
1102 | 155 | 156 | ||
1103 | 156 | void mir_surface_spec_set_state(MirSurfaceSpec* spec, MirSurfaceState state) | 157 | void mir_surface_spec_set_state(MirSurfaceSpec* spec, MirSurfaceState state) |
1105 | 157 | __attribute__((deprecated("use mir_window_spec_set_state() instead"))); | 158 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_state() instead"); |
1106 | 158 | 159 | ||
1107 | 159 | void mir_surface_spec_release(MirSurfaceSpec* spec) | 160 | void mir_surface_spec_release(MirSurfaceSpec* spec) |
1109 | 160 | __attribute__((deprecated("use mir_window_spec_release() instead"))); | 161 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_release() instead"); |
1110 | 161 | 162 | ||
1111 | 162 | void mir_surface_spec_set_input_shape(MirSurfaceSpec* spec, | 163 | void mir_surface_spec_set_input_shape(MirSurfaceSpec* spec, |
1112 | 163 | MirRectangle const *rectangles, | 164 | MirRectangle const *rectangles, |
1113 | 164 | size_t n_rects) | 165 | size_t n_rects) |
1115 | 165 | __attribute__((deprecated("use mir_window_spec_set_input_shape() instead"))); | 166 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_input_shape() instead"); |
1116 | 166 | 167 | ||
1117 | 167 | void mir_surface_spec_set_event_handler(MirSurfaceSpec* spec, | 168 | void mir_surface_spec_set_event_handler(MirSurfaceSpec* spec, |
1118 | 168 | mir_surface_event_callback callback, | 169 | mir_surface_event_callback callback, |
1119 | 169 | void* context) | 170 | void* context) |
1121 | 170 | __attribute__((deprecated("use mir_window_spec_set_event_handler() instead"))); | 171 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_event_handler() instead"); |
1122 | 171 | 172 | ||
1123 | 172 | void mir_surface_spec_set_shell_chrome(MirSurfaceSpec* spec, MirShellChrome style) | 173 | void mir_surface_spec_set_shell_chrome(MirSurfaceSpec* spec, MirShellChrome style) |
1125 | 173 | __attribute__((deprecated("use mir_window_spec_set_shell_chrome() instead"))); | 174 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_shell_chrome() instead"); |
1126 | 174 | 175 | ||
1127 | 175 | void mir_surface_spec_set_pointer_confinement(MirSurfaceSpec* spec, MirPointerConfinementState state) | 176 | void mir_surface_spec_set_pointer_confinement(MirSurfaceSpec* spec, MirPointerConfinementState state) |
1129 | 176 | __attribute__((deprecated("use mir_window_spec_set_pointer_confinement() instead"))); | 177 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_pointer_confinement() instead"); |
1130 | 177 | 178 | ||
1131 | 178 | void mir_surface_spec_set_placement(MirSurfaceSpec* spec, | 179 | void mir_surface_spec_set_placement(MirSurfaceSpec* spec, |
1132 | 179 | const MirRectangle* rect, | 180 | const MirRectangle* rect, |
1133 | @@ -182,69 +183,69 @@ | |||
1134 | 182 | MirPlacementHints placement_hints, | 183 | MirPlacementHints placement_hints, |
1135 | 183 | int offset_dx, | 184 | int offset_dx, |
1136 | 184 | int offset_dy) | 185 | int offset_dy) |
1138 | 185 | __attribute__((deprecated("use mir_window_spec_set_placement() instead"))); | 186 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_placement() instead"); |
1139 | 186 | 187 | ||
1140 | 187 | MirSurfaceSpec* mir_connection_create_spec_for_input_method(MirConnection* connection, | 188 | MirSurfaceSpec* mir_connection_create_spec_for_input_method(MirConnection* connection, |
1141 | 188 | int width, int height, | 189 | int width, int height, |
1142 | 189 | MirPixelFormat format) | 190 | MirPixelFormat format) |
1144 | 190 | __attribute__((deprecated("use mir_create_input_method_window_spec() instead"))); | 191 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_input_method_window_spec() instead"); |
1145 | 191 | 192 | ||
1146 | 192 | void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format) | 193 | void mir_surface_spec_set_pixel_format(MirSurfaceSpec* spec, MirPixelFormat format) |
1148 | 193 | __attribute__((deprecated("use mir_window_spec_set_pixel_format() instead"))); | 194 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_pixel_format() instead"); |
1149 | 194 | 195 | ||
1150 | 195 | void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage) | 196 | void mir_surface_spec_set_buffer_usage(MirSurfaceSpec* spec, MirBufferUsage usage) |
1152 | 196 | __attribute__((deprecated("use mir_window_spec_set_buffer_usage() instead"))); | 197 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_buffer_usage() instead"); |
1153 | 197 | 198 | ||
1154 | 198 | void mir_surface_spec_set_streams(MirSurfaceSpec* spec, | 199 | void mir_surface_spec_set_streams(MirSurfaceSpec* spec, |
1155 | 199 | MirBufferStreamInfo* streams, | 200 | MirBufferStreamInfo* streams, |
1156 | 200 | unsigned int num_streams) | 201 | unsigned int num_streams) |
1158 | 201 | __attribute__((deprecated("use mir_window_spec_set_streams() instead"))); | 202 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_streams() instead"); |
1159 | 202 | 203 | ||
1160 | 203 | void mir_surface_apply_spec(MirSurface* surface, MirSurfaceSpec* spec) | 204 | void mir_surface_apply_spec(MirSurface* surface, MirSurfaceSpec* spec) |
1162 | 204 | __attribute__((deprecated("use mir_window_apply_spec() instead"))); | 205 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_apply_spec() instead"); |
1163 | 205 | 206 | ||
1164 | 206 | bool mir_surface_is_valid(MirSurface *surface) | 207 | bool mir_surface_is_valid(MirSurface *surface) |
1166 | 207 | __attribute__((deprecated("use mir_window_is_valid() instead"))); | 208 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_is_valid() instead"); |
1167 | 208 | 209 | ||
1168 | 209 | MirWaitHandle* mir_surface_create(MirSurfaceSpec* requested_specification, | 210 | MirWaitHandle* mir_surface_create(MirSurfaceSpec* requested_specification, |
1169 | 210 | mir_surface_callback callback, void* context) | 211 | mir_surface_callback callback, void* context) |
1171 | 211 | __attribute__((deprecated("use mir_create_window() instead"))); | 212 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_window() instead"); |
1172 | 212 | 213 | ||
1173 | 213 | MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification) | 214 | MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification) |
1175 | 214 | __attribute__((deprecated("use mir_create_window_sync() instead"))); | 215 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_window_sync() instead"); |
1176 | 215 | 216 | ||
1177 | 216 | MirWaitHandle *mir_surface_release( | 217 | MirWaitHandle *mir_surface_release( |
1178 | 217 | MirSurface *surface, | 218 | MirSurface *surface, |
1179 | 218 | mir_surface_callback callback, | 219 | mir_surface_callback callback, |
1180 | 219 | void *context) | 220 | void *context) |
1182 | 220 | __attribute__((deprecated("use mir_window_release() instead"))); | 221 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_release() instead"); |
1183 | 221 | 222 | ||
1184 | 222 | void mir_surface_release_sync(MirSurface *surface) | 223 | void mir_surface_release_sync(MirSurface *surface) |
1186 | 223 | __attribute__((deprecated("use mir_window_release_sync() instead"))); | 224 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_release_sync() instead"); |
1187 | 224 | 225 | ||
1188 | 225 | void mir_surface_set_event_handler(MirSurface *surface, | 226 | void mir_surface_set_event_handler(MirSurface *surface, |
1189 | 226 | mir_surface_event_callback callback, | 227 | mir_surface_event_callback callback, |
1190 | 227 | void* context) | 228 | void* context) |
1192 | 228 | __attribute__((deprecated("use mir_window_set_event_handler() instead"))); | 229 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_event_handler() instead"); |
1193 | 229 | 230 | ||
1194 | 230 | MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface) | 231 | MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface) |
1196 | 231 | __attribute__((deprecated("use mir_window_get_buffer_stream() instead"))); | 232 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_buffer_stream() instead"); |
1197 | 232 | 233 | ||
1198 | 233 | char const* mir_surface_get_error_message(MirSurface *surface) | 234 | char const* mir_surface_get_error_message(MirSurface *surface) |
1200 | 234 | __attribute__((deprecated("use mir_window_get_error_message() instead"))); | 235 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_error_message() instead"); |
1201 | 235 | 236 | ||
1202 | 236 | void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters) | 237 | void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters) |
1204 | 237 | __attribute__((deprecated("use mir_window_get_parameters() instead"))); | 238 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_parameters() instead"); |
1205 | 238 | 239 | ||
1206 | 239 | MirSurfaceType mir_surface_get_type(MirSurface* surface) | 240 | MirSurfaceType mir_surface_get_type(MirSurface* surface) |
1208 | 240 | __attribute__((deprecated("use mir_window_get_type() instead"))); | 241 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_type() instead"); |
1209 | 241 | 242 | ||
1210 | 242 | MirWaitHandle* mir_surface_set_state(MirSurface *surface, | 243 | MirWaitHandle* mir_surface_set_state(MirSurface *surface, |
1211 | 243 | MirSurfaceState state) | 244 | MirSurfaceState state) |
1213 | 244 | __attribute__((deprecated("use mir_window_set_state() instead"))); | 245 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_state() instead"); |
1214 | 245 | 246 | ||
1215 | 246 | MirSurfaceState mir_surface_get_state(MirSurface *surface) | 247 | MirSurfaceState mir_surface_get_state(MirSurface *surface) |
1217 | 247 | __attribute__((deprecated("use mir_window_get_state() instead"))); | 248 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_state() instead"); |
1218 | 248 | 249 | ||
1219 | 249 | /** | 250 | /** |
1220 | 250 | * Set the swapinterval for the default stream. | 251 | * Set the swapinterval for the default stream. |
1221 | @@ -260,37 +261,37 @@ | |||
1222 | 260 | * or NULL if the interval could not be supported | 261 | * or NULL if the interval could not be supported |
1223 | 261 | */ | 262 | */ |
1224 | 262 | MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval) | 263 | MirWaitHandle* mir_surface_set_swapinterval(MirSurface* surface, int interval) |
1226 | 263 | __attribute__((deprecated("Swap interval should be set on the backing content"))); | 264 | MIR_FOR_REMOVAL_IN_VERSION_1("Swap interval should be set on the backing content"); |
1227 | 264 | 265 | ||
1228 | 265 | int mir_surface_get_dpi(MirSurface* surface) | 266 | int mir_surface_get_dpi(MirSurface* surface) |
1230 | 266 | __attribute__((deprecated("use mir_window_get_dpi() instead"))); | 267 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_dpi() instead"); |
1231 | 267 | 268 | ||
1232 | 268 | MirSurfaceFocusState mir_surface_get_focus(MirSurface *surface) | 269 | MirSurfaceFocusState mir_surface_get_focus(MirSurface *surface) |
1234 | 269 | __attribute__((deprecated("use mir_window_get_focus_state() instead"))); | 270 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_focus_state() instead"); |
1235 | 270 | 271 | ||
1236 | 271 | MirSurfaceVisibility mir_surface_get_visibility(MirSurface *surface) | 272 | MirSurfaceVisibility mir_surface_get_visibility(MirSurface *surface) |
1238 | 272 | __attribute__((deprecated("use mir_window_get_visibility() instead"))); | 273 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_visibility() instead"); |
1239 | 273 | 274 | ||
1240 | 274 | MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters) | 275 | MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters) |
1242 | 275 | __attribute__((deprecated("use mir_window_configure_cursor() instead"))); | 276 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_configure_cursor() instead"); |
1243 | 276 | 277 | ||
1244 | 277 | MirOrientation mir_surface_get_orientation(MirSurface *surface) | 278 | MirOrientation mir_surface_get_orientation(MirSurface *surface) |
1246 | 278 | __attribute__((deprecated("use mir_window_get_orientation() instead"))); | 279 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_orientation() instead"); |
1247 | 279 | 280 | ||
1248 | 280 | MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation) | 281 | MirWaitHandle* mir_surface_set_preferred_orientation(MirSurface *surface, MirOrientationMode orientation) |
1250 | 281 | __attribute__((deprecated("use mir_window_set_preferred_orientation() instead"))); | 282 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_preferred_orientation() instead"); |
1251 | 282 | 283 | ||
1252 | 283 | MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surface) | 284 | MirOrientationMode mir_surface_get_preferred_orientation(MirSurface *surface) |
1254 | 284 | __attribute__((deprecated("use mir_window_get_preferred_orientation() instead"))); | 285 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_preferred_orientation() instead"); |
1255 | 285 | 286 | ||
1256 | 286 | MirWaitHandle* mir_surface_request_persistent_id(MirSurface* surface, mir_surface_id_callback callback, void* context) | 287 | MirWaitHandle* mir_surface_request_persistent_id(MirSurface* surface, mir_surface_id_callback callback, void* context) |
1258 | 287 | __attribute__((deprecated("use mir_window_request_persistent_id() instead"))); | 288 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_request_persistent_id() instead"); |
1259 | 288 | 289 | ||
1260 | 289 | MirPersistentId* mir_surface_request_persistent_id_sync(MirSurface *surface) | 290 | MirPersistentId* mir_surface_request_persistent_id_sync(MirSurface *surface) |
1262 | 290 | __attribute__((deprecated("use mir_window_request_persistent_id_sync() instead"))); | 291 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_request_persistent_id_sync() instead"); |
1263 | 291 | 292 | ||
1264 | 292 | void mir_surface_raise(MirSurface* surface, MirCookie const* cookie) | 293 | void mir_surface_raise(MirSurface* surface, MirCookie const* cookie) |
1266 | 293 | __attribute__((deprecated("use mir_window_raise() instead"))); | 294 | MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_raise() instead"); |
1267 | 294 | 295 | ||
1268 | 295 | #pragma GCC diagnostic pop | 296 | #pragma GCC diagnostic pop |
1269 | 296 | 297 | ||
1270 | 297 | 298 | ||
1271 | === modified file 'include/client/mir_toolkit/mir_wait.h' | |||
1272 | --- include/client/mir_toolkit/mir_wait.h 2017-01-19 23:17:56 +0000 | |||
1273 | +++ include/client/mir_toolkit/mir_wait.h 2017-06-05 10:39:04 +0000 | |||
1274 | @@ -19,6 +19,7 @@ | |||
1275 | 19 | #define MIR_TOOLKIT_MIR_WAIT_H_ | 19 | #define MIR_TOOLKIT_MIR_WAIT_H_ |
1276 | 20 | 20 | ||
1277 | 21 | #include <mir_toolkit/client_types.h> | 21 | #include <mir_toolkit/client_types.h> |
1278 | 22 | #include <mir_toolkit/deprecations.h> | ||
1279 | 22 | 23 | ||
1280 | 23 | #ifdef __cplusplus | 24 | #ifdef __cplusplus |
1281 | 24 | /** | 25 | /** |
1282 | @@ -36,7 +37,7 @@ | |||
1283 | 36 | * \param [in] wait_handle Handle returned by an asynchronous request | 37 | * \param [in] wait_handle Handle returned by an asynchronous request |
1284 | 37 | */ | 38 | */ |
1285 | 38 | void mir_wait_for(MirWaitHandle *wait_handle) | 39 | void mir_wait_for(MirWaitHandle *wait_handle) |
1287 | 39 | __attribute__ ((deprecated("No longer supported - use callbacks or wait for state changes"))); | 40 | MIR_FOR_REMOVAL_IN_VERSION_1("No longer supported - use callbacks or wait for state changes"); |
1288 | 40 | 41 | ||
1289 | 41 | /** | 42 | /** |
1290 | 42 | * Wait on the supplied handle until one instance of the associated request | 43 | * Wait on the supplied handle until one instance of the associated request |
1291 | @@ -47,7 +48,7 @@ | |||
1292 | 47 | * \param [in] wait_handle Handle returned by an asynchronous request | 48 | * \param [in] wait_handle Handle returned by an asynchronous request |
1293 | 48 | */ | 49 | */ |
1294 | 49 | void mir_wait_for_one(MirWaitHandle *wait_handle) | 50 | void mir_wait_for_one(MirWaitHandle *wait_handle) |
1296 | 50 | __attribute__ ((deprecated("No longer supported - use callbacks or wait for state changes"))); | 51 | MIR_FOR_REMOVAL_IN_VERSION_1("No longer supported - use callbacks or wait for state changes"); |
1297 | 51 | 52 | ||
1298 | 52 | 53 | ||
1299 | 53 | #ifdef __cplusplus | 54 | #ifdef __cplusplus |
1300 | 54 | 55 | ||
1301 | === modified file 'include/client/mir_toolkit/mir_window.h' | |||
1302 | --- include/client/mir_toolkit/mir_window.h 2017-02-03 20:39:06 +0000 | |||
1303 | +++ include/client/mir_toolkit/mir_window.h 2017-06-05 10:39:04 +0000 | |||
1304 | @@ -22,6 +22,7 @@ | |||
1305 | 22 | #include <mir_toolkit/client_types.h> | 22 | #include <mir_toolkit/client_types.h> |
1306 | 23 | #include <mir_toolkit/common.h> | 23 | #include <mir_toolkit/common.h> |
1307 | 24 | #include <mir_toolkit/mir_cursor_configuration.h> | 24 | #include <mir_toolkit/mir_cursor_configuration.h> |
1308 | 25 | #include <mir_toolkit/deprecations.h> | ||
1309 | 25 | 26 | ||
1310 | 26 | #include <stdbool.h> | 27 | #include <stdbool.h> |
1311 | 27 | 28 | ||
1312 | @@ -555,7 +556,7 @@ | |||
1313 | 555 | MirRenderSurface* render_surface, | 556 | MirRenderSurface* render_surface, |
1314 | 556 | int logical_width, int logical_height, | 557 | int logical_width, int logical_height, |
1315 | 557 | int displacement_x, int displacement_y) | 558 | int displacement_x, int displacement_y) |
1317 | 558 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 559 | MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface-->MirSurface transition"); |
1318 | 559 | #pragma GCC diagnostic pop | 560 | #pragma GCC diagnostic pop |
1319 | 560 | 561 | ||
1320 | 561 | /** | 562 | /** |
1321 | @@ -774,7 +775,7 @@ | |||
1322 | 774 | * \param [in,out] context User data passed to completion callback. | 775 | * \param [in,out] context User data passed to completion callback. |
1323 | 775 | */ | 776 | */ |
1324 | 776 | void mir_window_request_persistent_id(MirWindow* window, MirWindowIdCallback callback, void* context) | 777 | void mir_window_request_persistent_id(MirWindow* window, MirWindowIdCallback callback, void* context) |
1326 | 777 | __attribute__((deprecated("Use mir_window_request_window_id() instead"))); | 778 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_request_window_id() instead"); |
1327 | 778 | void mir_window_request_window_id(MirWindow* window, MirWindowIdCallback callback, void* context); | 779 | void mir_window_request_window_id(MirWindow* window, MirWindowIdCallback callback, void* context); |
1328 | 779 | 780 | ||
1329 | 780 | /** | 781 | /** |
1330 | @@ -784,7 +785,7 @@ | |||
1331 | 784 | * be freed with a call to mir_persistent_id_release() | 785 | * be freed with a call to mir_persistent_id_release() |
1332 | 785 | */ | 786 | */ |
1333 | 786 | MirPersistentId* mir_window_request_persistent_id_sync(MirWindow* window) | 787 | MirPersistentId* mir_window_request_persistent_id_sync(MirWindow* window) |
1335 | 787 | __attribute__((deprecated("Use mir_window_request_window_id_sync"))); | 788 | MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_request_window_id_sync"); |
1336 | 788 | MirWindowId* mir_window_request_window_id_sync(MirWindow* window); | 789 | MirWindowId* mir_window_request_window_id_sync(MirWindow* window); |
1337 | 789 | #ifdef __cplusplus | 790 | #ifdef __cplusplus |
1338 | 790 | } | 791 | } |
1339 | 791 | 792 | ||
1340 | === modified file 'include/client/mir_toolkit/rs/mir_render_surface.h' | |||
1341 | --- include/client/mir_toolkit/rs/mir_render_surface.h 2017-03-16 16:47:21 +0000 | |||
1342 | +++ include/client/mir_toolkit/rs/mir_render_surface.h 2017-06-05 10:39:04 +0000 | |||
1343 | @@ -21,6 +21,18 @@ | |||
1344 | 21 | #define MIR_TOOLKIT_MIR_RENDER_SURFACE_H_ | 21 | #define MIR_TOOLKIT_MIR_RENDER_SURFACE_H_ |
1345 | 22 | 22 | ||
1346 | 23 | #include <mir_toolkit/client_types.h> | 23 | #include <mir_toolkit/client_types.h> |
1347 | 24 | #include <mir_toolkit/deprecations.h> | ||
1348 | 25 | |||
1349 | 26 | #ifndef MIR_DEPRECATE_RENDERSURFACES | ||
1350 | 27 | #define MIR_DEPRECATE_RENDERSURFACES 0 | ||
1351 | 28 | #endif | ||
1352 | 29 | |||
1353 | 30 | #if MIR_ENABLE_DEPRECATIONS > 0 && MIR_DEPRECATE_RENDERSURFACES > 0 | ||
1354 | 31 | #define MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME\ | ||
1355 | 32 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))) | ||
1356 | 33 | #else | ||
1357 | 34 | #define MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME | ||
1358 | 35 | #endif | ||
1359 | 24 | 36 | ||
1360 | 25 | #ifdef __cplusplus | 37 | #ifdef __cplusplus |
1361 | 26 | /** | 38 | /** |
1362 | @@ -30,6 +42,9 @@ | |||
1363 | 30 | extern "C" { | 42 | extern "C" { |
1364 | 31 | #endif | 43 | #endif |
1365 | 32 | 44 | ||
1366 | 45 | typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context) | ||
1367 | 46 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
1368 | 47 | |||
1369 | 33 | #pragma GCC diagnostic push | 48 | #pragma GCC diagnostic push |
1370 | 34 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 49 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1371 | 35 | /** | 50 | /** |
1372 | @@ -49,7 +64,7 @@ | |||
1373 | 49 | int width, int height, | 64 | int width, int height, |
1374 | 50 | MirRenderSurfaceCallback callback, | 65 | MirRenderSurfaceCallback callback, |
1375 | 51 | void* context) | 66 | void* context) |
1377 | 52 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 67 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; |
1378 | 53 | 68 | ||
1379 | 54 | /** | 69 | /** |
1380 | 55 | * Create a render surface and wait for the result | 70 | * Create a render surface and wait for the result |
1381 | @@ -64,7 +79,7 @@ | |||
1382 | 64 | MirRenderSurface* mir_connection_create_render_surface_sync( | 79 | MirRenderSurface* mir_connection_create_render_surface_sync( |
1383 | 65 | MirConnection* connection, | 80 | MirConnection* connection, |
1384 | 66 | int width, int height) | 81 | int width, int height) |
1386 | 67 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 82 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; |
1387 | 68 | 83 | ||
1388 | 69 | /** | 84 | /** |
1389 | 70 | * Get the size of the MirRenderSurface | 85 | * Get the size of the MirRenderSurface |
1390 | @@ -76,7 +91,7 @@ | |||
1391 | 76 | void mir_render_surface_get_size( | 91 | void mir_render_surface_get_size( |
1392 | 77 | MirRenderSurface* render_surface, | 92 | MirRenderSurface* render_surface, |
1393 | 78 | int* width, int* height) | 93 | int* width, int* height) |
1395 | 79 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 94 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; |
1396 | 80 | 95 | ||
1397 | 81 | /** | 96 | /** |
1398 | 82 | * Set the size of the MirRenderSurface | 97 | * Set the size of the MirRenderSurface |
1399 | @@ -88,7 +103,7 @@ | |||
1400 | 88 | void mir_render_surface_set_size( | 103 | void mir_render_surface_set_size( |
1401 | 89 | MirRenderSurface* render_surface, | 104 | MirRenderSurface* render_surface, |
1402 | 90 | int width, int height) | 105 | int width, int height) |
1404 | 91 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 106 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; |
1405 | 92 | 107 | ||
1406 | 93 | /** | 108 | /** |
1407 | 94 | * Test for a valid render surface | 109 | * Test for a valid render surface |
1408 | @@ -100,8 +115,7 @@ | |||
1409 | 100 | */ | 115 | */ |
1410 | 101 | bool mir_render_surface_is_valid( | 116 | bool mir_render_surface_is_valid( |
1411 | 102 | MirRenderSurface* render_surface) | 117 | MirRenderSurface* render_surface) |
1414 | 103 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 118 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; |
1413 | 104 | |||
1415 | 105 | /** | 119 | /** |
1416 | 106 | * Retrieve a text description of the error. The returned string is owned by | 120 | * Retrieve a text description of the error. The returned string is owned by |
1417 | 107 | * the library and remains valid until the render surface or the associated | 121 | * the library and remains valid until the render surface or the associated |
1418 | @@ -113,7 +127,7 @@ | |||
1419 | 113 | */ | 127 | */ |
1420 | 114 | char const *mir_render_surface_get_error_message( | 128 | char const *mir_render_surface_get_error_message( |
1421 | 115 | MirRenderSurface* render_surface) | 129 | MirRenderSurface* render_surface) |
1423 | 116 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 130 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; |
1424 | 117 | 131 | ||
1425 | 118 | /** | 132 | /** |
1426 | 119 | * Release the specified render surface | 133 | * Release the specified render surface |
1427 | @@ -122,7 +136,7 @@ | |||
1428 | 122 | */ | 136 | */ |
1429 | 123 | void mir_render_surface_release( | 137 | void mir_render_surface_release( |
1430 | 124 | MirRenderSurface* render_surface) | 138 | MirRenderSurface* render_surface) |
1432 | 125 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 139 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; |
1433 | 126 | 140 | ||
1434 | 127 | /** | 141 | /** |
1435 | 128 | * Obtain the buffer stream backing a given render surface. | 142 | * Obtain the buffer stream backing a given render surface. |
1436 | @@ -142,7 +156,7 @@ | |||
1437 | 142 | MirRenderSurface* render_surface, | 156 | MirRenderSurface* render_surface, |
1438 | 143 | int width, int height, | 157 | int width, int height, |
1439 | 144 | MirPixelFormat format) | 158 | MirPixelFormat format) |
1441 | 145 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 159 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; |
1442 | 146 | 160 | ||
1443 | 147 | /** | 161 | /** |
1444 | 148 | * Obtain the presentation chain backing a given render surface. | 162 | * Obtain the presentation chain backing a given render surface. |
1445 | @@ -155,7 +169,7 @@ | |||
1446 | 155 | */ | 169 | */ |
1447 | 156 | MirPresentationChain* mir_render_surface_get_presentation_chain( | 170 | MirPresentationChain* mir_render_surface_get_presentation_chain( |
1448 | 157 | MirRenderSurface* render_surface) | 171 | MirRenderSurface* render_surface) |
1450 | 158 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 172 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; |
1451 | 159 | 173 | ||
1452 | 160 | /** Query whether the server supports a given presentation mode. | 174 | /** Query whether the server supports a given presentation mode. |
1453 | 161 | * | 175 | * |
1454 | @@ -189,7 +203,29 @@ | |||
1455 | 189 | MirWindowSpec* spec, | 203 | MirWindowSpec* spec, |
1456 | 190 | MirRenderSurface* render_surface, | 204 | MirRenderSurface* render_surface, |
1457 | 191 | int hotspot_x, int hotspot_y) | 205 | int hotspot_x, int hotspot_y) |
1459 | 192 | __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition"))); | 206 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; |
1460 | 207 | |||
1461 | 208 | /** | ||
1462 | 209 | * Set the MirWindowSpec to display content contained in a render surface | ||
1463 | 210 | * | ||
1464 | 211 | * \warning: The initial call to mir_window_spec_add_render_surface will set | ||
1465 | 212 | * the bottom-most content, and subsequent calls will stack the | ||
1466 | 213 | * content on top. | ||
1467 | 214 | * | ||
1468 | 215 | * \param spec The window_spec to be updated | ||
1469 | 216 | * \param render_surface The render surface containing the content to be displayed | ||
1470 | 217 | * \param logical_width The width that the content will be displayed at | ||
1471 | 218 | * (Ignored for buffer streams) | ||
1472 | 219 | * \param logical_height The height that the content will be displayed at | ||
1473 | 220 | * (Ignored for buffer streams) | ||
1474 | 221 | * \param displacement_x The x displacement from the top-left corner of the MirWindow | ||
1475 | 222 | * \param displacement_y The y displacement from the top-left corner of the MirWindow | ||
1476 | 223 | */ | ||
1477 | 224 | void mir_window_spec_add_render_surface(MirWindowSpec* spec, | ||
1478 | 225 | MirRenderSurface* render_surface, | ||
1479 | 226 | int logical_width, int logical_height, | ||
1480 | 227 | int displacement_x, int displacement_y) | ||
1481 | 228 | MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME; | ||
1482 | 193 | 229 | ||
1483 | 194 | #pragma GCC diagnostic pop | 230 | #pragma GCC diagnostic pop |
1484 | 195 | 231 | ||
1485 | 196 | 232 | ||
1486 | === modified file 'include/core/mir_toolkit/common.h' | |||
1487 | --- include/core/mir_toolkit/common.h 2017-01-23 22:29:00 +0000 | |||
1488 | +++ include/core/mir_toolkit/common.h 2017-06-05 10:39:04 +0000 | |||
1489 | @@ -21,6 +21,8 @@ | |||
1490 | 21 | #ifndef MIR_COMMON_H_ | 21 | #ifndef MIR_COMMON_H_ |
1491 | 22 | #define MIR_COMMON_H_ | 22 | #define MIR_COMMON_H_ |
1492 | 23 | 23 | ||
1493 | 24 | #include <mir_toolkit/deprecations.h> | ||
1494 | 25 | |||
1495 | 24 | //for clang | 26 | //for clang |
1496 | 25 | #ifndef __has_feature | 27 | #ifndef __has_feature |
1497 | 26 | #define __has_feature(x) 0 // Compatibility with non-clang | 28 | #define __has_feature(x) 0 // Compatibility with non-clang |
1498 | @@ -35,7 +37,7 @@ | |||
1499 | 35 | (__has_extension(attribute_deprecated_with_message) && \ | 37 | (__has_extension(attribute_deprecated_with_message) && \ |
1500 | 36 | __has_extension(enumerator_attributes)) | 38 | __has_extension(enumerator_attributes)) |
1501 | 37 | #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \ | 39 | #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \ |
1503 | 38 | ENUM __attribute__ ((deprecated("Use " #INSTEAD " instead"))) | 40 | ENUM MIR_FOR_REMOVAL_IN_VERSION_1("Use " #INSTEAD " instead") |
1504 | 39 | #else | 41 | #else |
1505 | 40 | #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \ | 42 | #define MIR_DEPRECATED_ENUM(ENUM, INSTEAD) \ |
1506 | 41 | ENUM | 43 | ENUM |
1507 | @@ -65,7 +67,7 @@ | |||
1508 | 65 | mir_surface_attrib_preferred_orientation, | 67 | mir_surface_attrib_preferred_orientation, |
1509 | 66 | /* Must be last */ | 68 | /* Must be last */ |
1510 | 67 | mir_surface_attribs | 69 | mir_surface_attribs |
1512 | 68 | } MirSurfaceAttrib __attribute__ ((deprecated("use MirWindowAttrib"))); | 70 | } MirSurfaceAttrib MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowAttrib"); |
1513 | 69 | 71 | ||
1514 | 70 | /** | 72 | /** |
1515 | 71 | * Attributes of a window that the client and server/shell may wish to | 73 | * Attributes of a window that the client and server/shell may wish to |
1516 | @@ -102,7 +104,7 @@ | |||
1517 | 102 | mir_surface_type_satellite, /**< AKA "toolbox"/"toolbar" */ | 104 | mir_surface_type_satellite, /**< AKA "toolbox"/"toolbar" */ |
1518 | 103 | mir_surface_type_tip, /**< AKA "tooltip" */ | 105 | mir_surface_type_tip, /**< AKA "tooltip" */ |
1519 | 104 | mir_surface_types | 106 | mir_surface_types |
1521 | 105 | } MirSurfaceType __attribute__ ((deprecated("use MirWindowType"))); | 107 | } MirSurfaceType MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowType"); |
1522 | 106 | 108 | ||
1523 | 107 | typedef enum MirWindowType | 109 | typedef enum MirWindowType |
1524 | 108 | { | 110 | { |
1525 | @@ -132,7 +134,7 @@ | |||
1526 | 132 | mir_surface_state_horizmaximized, | 134 | mir_surface_state_horizmaximized, |
1527 | 133 | mir_surface_state_hidden, | 135 | mir_surface_state_hidden, |
1528 | 134 | mir_surface_states | 136 | mir_surface_states |
1530 | 135 | } MirSurfaceState __attribute__ ((deprecated("use MirWindowState"))); | 137 | } MirSurfaceState MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowState"); |
1531 | 136 | 138 | ||
1532 | 137 | typedef enum MirWindowState | 139 | typedef enum MirWindowState |
1533 | 138 | { | 140 | { |
1534 | @@ -154,7 +156,7 @@ | |||
1535 | 154 | { | 156 | { |
1536 | 155 | mir_surface_unfocused = 0, | 157 | mir_surface_unfocused = 0, |
1537 | 156 | mir_surface_focused | 158 | mir_surface_focused |
1539 | 157 | } MirSurfaceFocusState __attribute__ ((deprecated("use MirWindowFocusState"))); | 159 | } MirSurfaceFocusState MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowFocusState"); |
1540 | 158 | 160 | ||
1541 | 159 | typedef enum MirWindowFocusState | 161 | typedef enum MirWindowFocusState |
1542 | 160 | { | 162 | { |
1543 | @@ -166,7 +168,7 @@ | |||
1544 | 166 | { | 168 | { |
1545 | 167 | mir_surface_visibility_occluded = 0, | 169 | mir_surface_visibility_occluded = 0, |
1546 | 168 | mir_surface_visibility_exposed | 170 | mir_surface_visibility_exposed |
1548 | 169 | } MirSurfaceVisibility __attribute__ ((deprecated("use MirWindowFocusState"))); | 171 | } MirSurfaceVisibility MIR_FOR_REMOVAL_IN_VERSION_1("use MirWindowFocusState"); |
1549 | 170 | 172 | ||
1550 | 171 | typedef enum MirWindowVisibility | 173 | typedef enum MirWindowVisibility |
1551 | 172 | { | 174 | { |
1552 | 173 | 175 | ||
1553 | === added file 'include/core/mir_toolkit/deprecations.h' | |||
1554 | --- include/core/mir_toolkit/deprecations.h 1970-01-01 00:00:00 +0000 | |||
1555 | +++ include/core/mir_toolkit/deprecations.h 2017-06-05 10:39:04 +0000 | |||
1556 | @@ -0,0 +1,36 @@ | |||
1557 | 1 | /* | ||
1558 | 2 | * Copyright © 2017 Canonical Ltd. | ||
1559 | 3 | * | ||
1560 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1561 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
1562 | 6 | * as published by the Free Software Foundation. | ||
1563 | 7 | * | ||
1564 | 8 | * This program is distributed in the hope that it will be useful, | ||
1565 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1566 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1567 | 11 | * GNU Lesser General Public License for more details. | ||
1568 | 12 | * | ||
1569 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
1570 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1571 | 15 | */ | ||
1572 | 16 | |||
1573 | 17 | #ifndef MIR_DEPRECATIONS_H_ | ||
1574 | 18 | #define MIR_DEPRECATIONS_H_ | ||
1575 | 19 | |||
1576 | 20 | #ifndef MIR_ENABLE_DEPRECATIONS | ||
1577 | 21 | // use g++ version < 6.2 as a proxy for building on Ubunutu 16.04LTS ("Xenial") or 16.10 (Yakkety) | ||
1578 | 22 | #if defined(__clang__) || !defined(__GNUC__) || (__GNUC__ > 6) || ((__GNUC__ == 6) && (__GNUC_MINOR__ >= 2)) | ||
1579 | 23 | #define MIR_ENABLE_DEPRECATIONS 1 | ||
1580 | 24 | #else | ||
1581 | 25 | #define MIR_ENABLE_DEPRECATIONS 0 | ||
1582 | 26 | #endif | ||
1583 | 27 | #endif | ||
1584 | 28 | |||
1585 | 29 | #if MIR_ENABLE_DEPRECATIONS > 0 | ||
1586 | 30 | #define MIR_FOR_REMOVAL_IN_VERSION_1(message)\ | ||
1587 | 31 | __attribute__((deprecated(message))) | ||
1588 | 32 | #else | ||
1589 | 33 | #define MIR_FOR_REMOVAL_IN_VERSION_1(message) | ||
1590 | 34 | #endif | ||
1591 | 35 | |||
1592 | 36 | #endif //MIR_DEPRECATIONS_H_ | ||
1593 | 0 | 37 | ||
1594 | === modified file 'src/common/events/input_configuration_event.cpp' | |||
1595 | --- src/common/events/input_configuration_event.cpp 2017-01-20 16:27:50 +0000 | |||
1596 | +++ src/common/events/input_configuration_event.cpp 2017-06-05 10:39:04 +0000 | |||
1597 | @@ -18,13 +18,12 @@ | |||
1598 | 18 | 18 | ||
1599 | 19 | #include "mir/events/input_configuration_event.h" | 19 | #include "mir/events/input_configuration_event.h" |
1600 | 20 | 20 | ||
1601 | 21 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
1602 | 21 | MirInputConfigurationEvent::MirInputConfigurationEvent() | 22 | MirInputConfigurationEvent::MirInputConfigurationEvent() |
1603 | 22 | { | 23 | { |
1604 | 23 | event.initInputConfiguration(); | 24 | event.initInputConfiguration(); |
1605 | 24 | } | 25 | } |
1606 | 25 | 26 | ||
1607 | 26 | #pragma GCC diagnostic push | ||
1608 | 27 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
1609 | 28 | MirInputConfigurationAction MirInputConfigurationEvent::action() const | 27 | MirInputConfigurationAction MirInputConfigurationEvent::action() const |
1610 | 29 | { | 28 | { |
1611 | 30 | return static_cast<MirInputConfigurationAction>(event.asReader().getInputConfiguration().getAction()); | 29 | return static_cast<MirInputConfigurationAction>(event.asReader().getInputConfiguration().getAction()); |
1612 | @@ -34,7 +33,6 @@ | |||
1613 | 34 | { | 33 | { |
1614 | 35 | event.getInputConfiguration().setAction(static_cast<mir::capnp::InputConfigurationEvent::Action>(action)); | 34 | event.getInputConfiguration().setAction(static_cast<mir::capnp::InputConfigurationEvent::Action>(action)); |
1615 | 36 | } | 35 | } |
1616 | 37 | #pragma GCC diagnostic pop | ||
1617 | 38 | 36 | ||
1618 | 39 | std::chrono::nanoseconds MirInputConfigurationEvent::when() const | 37 | std::chrono::nanoseconds MirInputConfigurationEvent::when() const |
1619 | 40 | { | 38 | { |
1620 | 41 | 39 | ||
1621 | === modified file 'src/include/common/mir/events/input_configuration_event.h' | |||
1622 | --- src/include/common/mir/events/input_configuration_event.h 2017-01-20 16:27:50 +0000 | |||
1623 | +++ src/include/common/mir/events/input_configuration_event.h 2017-06-05 10:39:04 +0000 | |||
1624 | @@ -37,8 +37,7 @@ | |||
1625 | 37 | 37 | ||
1626 | 38 | MirInputDeviceId id() const; | 38 | MirInputDeviceId id() const; |
1627 | 39 | void set_id(MirInputDeviceId id); | 39 | void set_id(MirInputDeviceId id); |
1630 | 40 | } | 40 | }; |
1629 | 41 | __attribute__((deprecated)); | ||
1631 | 42 | #pragma GCC diagnostic pop | 41 | #pragma GCC diagnostic pop |
1632 | 43 | 42 | ||
1633 | 44 | #endif /* MIR_COMMON_INPUT_CONFIGURATION_EVENT_H_ */ | 43 | #endif /* MIR_COMMON_INPUT_CONFIGURATION_EVENT_H_ */ |
1634 | 45 | 44 | ||
1635 | === modified file 'src/platforms/android/utils/CMakeLists.txt' | |||
1636 | --- src/platforms/android/utils/CMakeLists.txt 2017-01-18 02:29:37 +0000 | |||
1637 | +++ src/platforms/android/utils/CMakeLists.txt 2017-06-05 10:39:04 +0000 | |||
1638 | @@ -36,6 +36,7 @@ | |||
1639 | 36 | ) | 36 | ) |
1640 | 37 | 37 | ||
1641 | 38 | target_link_libraries(mir_demo_standalone_render_overlays | 38 | target_link_libraries(mir_demo_standalone_render_overlays |
1642 | 39 | mirclient | ||
1643 | 39 | mircommon | 40 | mircommon |
1644 | 40 | mirplatform | 41 | mirplatform |
1645 | 41 | ) | 42 | ) |
1646 | 42 | 43 | ||
1647 | === modified file 'src/platforms/mesa/server/kms/kms_page_flipper.cpp' | |||
1648 | --- src/platforms/mesa/server/kms/kms_page_flipper.cpp 2017-01-18 02:29:37 +0000 | |||
1649 | +++ src/platforms/mesa/server/kms/kms_page_flipper.cpp 2017-06-05 10:39:04 +0000 | |||
1650 | @@ -26,6 +26,7 @@ | |||
1651 | 26 | #include <xf86drm.h> | 26 | #include <xf86drm.h> |
1652 | 27 | #include <xf86drmMode.h> | 27 | #include <xf86drmMode.h> |
1653 | 28 | #include <chrono> | 28 | #include <chrono> |
1654 | 29 | #include <cstring> | ||
1655 | 29 | 30 | ||
1656 | 30 | namespace mg = mir::graphics; | 31 | namespace mg = mir::graphics; |
1657 | 31 | namespace mgm = mir::graphics::mesa; | 32 | namespace mgm = mir::graphics::mesa; |
1658 | @@ -89,12 +90,11 @@ | |||
1659 | 89 | 90 | ||
1660 | 90 | mg::Frame mgm::KMSPageFlipper::wait_for_flip(uint32_t crtc_id) | 91 | mg::Frame mgm::KMSPageFlipper::wait_for_flip(uint32_t crtc_id) |
1661 | 91 | { | 92 | { |
1668 | 92 | static drmEventContext evctx = | 93 | drmEventContext evctx; |
1669 | 93 | { | 94 | memset(&evctx, 0, sizeof evctx); |
1670 | 94 | DRM_EVENT_CONTEXT_VERSION, /* .version */ | 95 | evctx.version = 2; // We only support the old v2 page_flip_handler |
1671 | 95 | 0, /* .vblank_handler */ | 96 | evctx.page_flip_handler = &page_flip_handler; |
1672 | 96 | page_flip_handler /* .page_flip_handler */ | 97 | |
1667 | 97 | }; | ||
1673 | 98 | static std::thread::id const invalid_tid; | 98 | static std::thread::id const invalid_tid; |
1674 | 99 | 99 | ||
1675 | 100 | { | 100 | { |
1676 | 101 | 101 | ||
1677 | === modified file 'src/server/input/default_configuration.cpp' | |||
1678 | --- src/server/input/default_configuration.cpp 2017-01-18 02:29:37 +0000 | |||
1679 | +++ src/server/input/default_configuration.cpp 2017-06-05 10:39:04 +0000 | |||
1680 | @@ -186,7 +186,9 @@ | |||
1681 | 186 | std::chrono::milliseconds const key_repeat_delay{50}; | 186 | std::chrono::milliseconds const key_repeat_delay{50}; |
1682 | 187 | 187 | ||
1683 | 188 | auto const options = the_options(); | 188 | auto const options = the_options(); |
1685 | 189 | auto enable_repeat = options->get<bool>(options::enable_key_repeat_opt); | 189 | // lp:1675357: Disable generation of key repeat events on nested servers |
1686 | 190 | auto enable_repeat = options->get<bool>(options::enable_key_repeat_opt) && | ||
1687 | 191 | !options->is_set(options::host_socket_opt); | ||
1688 | 190 | 192 | ||
1689 | 191 | return std::make_shared<mi::KeyRepeatDispatcher>( | 193 | return std::make_shared<mi::KeyRepeatDispatcher>( |
1690 | 192 | the_event_filter_chain_dispatcher(), the_main_loop(), the_cookie_authority(), | 194 | the_event_filter_chain_dispatcher(), the_main_loop(), the_cookie_authority(), |
1691 | @@ -365,7 +367,9 @@ | |||
1692 | 365 | the_key_mapper(), | 367 | the_key_mapper(), |
1693 | 366 | the_server_status_listener()); | 368 | the_server_status_listener()); |
1694 | 367 | 369 | ||
1696 | 368 | if (key_repeater && !the_options()->is_set(options::host_socket_opt)) | 370 | // lp:1675357: KeyRepeatDispatcher must be informed about removed input devices, otherwise |
1697 | 371 | // pressed keys get repeated indefinitely | ||
1698 | 372 | if (key_repeater) | ||
1699 | 369 | key_repeater->set_input_device_hub(hub); | 373 | key_repeater->set_input_device_hub(hub); |
1700 | 370 | return hub; | 374 | return hub; |
1701 | 371 | }); | 375 | }); |
1702 | 372 | 376 | ||
1703 | === modified file 'src/server/input/default_device.cpp' | |||
1704 | --- src/server/input/default_device.cpp 2017-01-18 02:29:37 +0000 | |||
1705 | +++ src/server/input/default_device.cpp 2017-06-05 10:39:04 +0000 | |||
1706 | @@ -30,10 +30,17 @@ | |||
1707 | 30 | 30 | ||
1708 | 31 | namespace mi = mir::input; | 31 | namespace mi = mir::input; |
1709 | 32 | 32 | ||
1714 | 33 | mi::DefaultDevice::DefaultDevice(MirInputDeviceId id, std::shared_ptr<dispatch::ActionQueue> const& actions, | 33 | mi::DefaultDevice::DefaultDevice(MirInputDeviceId id, |
1715 | 34 | InputDevice& device, std::shared_ptr<KeyMapper> const& key_mapper) | 34 | std::shared_ptr<dispatch::ActionQueue> const& actions, |
1716 | 35 | : device_id{id}, device{device}, info(device.get_device_info()), pointer{device.get_pointer_settings()}, | 35 | InputDevice& device, |
1717 | 36 | touchpad{device.get_touchpad_settings()}, actions{actions}, key_mapper{key_mapper} | 36 | std::shared_ptr<KeyMapper> const& key_mapper) |
1718 | 37 | : device_id{id}, | ||
1719 | 38 | device{device}, | ||
1720 | 39 | info(device.get_device_info()), | ||
1721 | 40 | pointer{device.get_pointer_settings()}, | ||
1722 | 41 | touchpad{device.get_touchpad_settings()}, | ||
1723 | 42 | actions{actions}, | ||
1724 | 43 | key_mapper{key_mapper} | ||
1725 | 37 | { | 44 | { |
1726 | 38 | if (contains(info.capabilities, mi::DeviceCapability::keyboard)) | 45 | if (contains(info.capabilities, mi::DeviceCapability::keyboard)) |
1727 | 39 | { | 46 | { |
1728 | @@ -70,8 +77,8 @@ | |||
1729 | 70 | auto const& settings = pointer.value(); | 77 | auto const& settings = pointer.value(); |
1730 | 71 | 78 | ||
1731 | 72 | return MirPointerConfig(settings.handedness, settings.acceleration, | 79 | return MirPointerConfig(settings.handedness, settings.acceleration, |
1734 | 73 | settings.cursor_acceleration_bias, settings.horizontal_scroll_scale, | 80 | settings.cursor_acceleration_bias, settings.horizontal_scroll_scale, |
1735 | 74 | settings.vertical_scroll_scale); | 81 | settings.vertical_scroll_scale); |
1736 | 75 | } | 82 | } |
1737 | 76 | 83 | ||
1738 | 77 | mir::optional_value<MirTouchpadConfig> mi::DefaultDevice::touchpad_configuration() const | 84 | mir::optional_value<MirTouchpadConfig> mi::DefaultDevice::touchpad_configuration() const |
1739 | @@ -82,14 +89,17 @@ | |||
1740 | 82 | auto const& settings = touchpad.value(); | 89 | auto const& settings = touchpad.value(); |
1741 | 83 | 90 | ||
1742 | 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, |
1745 | 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, |
1746 | 86 | settings.middle_mouse_button_emulation); | 93 | settings.middle_mouse_button_emulation); |
1747 | 87 | } | 94 | } |
1748 | 88 | 95 | ||
1749 | 89 | void mi::DefaultDevice::apply_pointer_configuration(MirPointerConfig const& conf) | 96 | void mi::DefaultDevice::apply_pointer_configuration(MirPointerConfig const& conf) |
1750 | 90 | { | 97 | { |
1753 | 91 | if (!pointer.is_set()) | 98 | { |
1754 | 92 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a pointer configuration")); | 99 | std::lock_guard<std::mutex> lock(config_mutex); |
1755 | 100 | if (!pointer.is_set()) | ||
1756 | 101 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a pointer configuration")); | ||
1757 | 102 | } | ||
1758 | 93 | 103 | ||
1759 | 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) |
1760 | 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")); |
1761 | @@ -101,18 +111,25 @@ | |||
1762 | 101 | settings.vertical_scroll_scale = conf.vertical_scroll_scale(); | 111 | settings.vertical_scroll_scale = conf.vertical_scroll_scale(); |
1763 | 102 | settings.horizontal_scroll_scale = conf.horizontal_scroll_scale(); | 112 | settings.horizontal_scroll_scale = conf.horizontal_scroll_scale(); |
1764 | 103 | 113 | ||
1771 | 104 | pointer = settings; | 114 | { |
1772 | 105 | 115 | std::lock_guard<std::mutex> lock(config_mutex); | |
1773 | 106 | actions->enqueue([settings = std::move(settings), dev=&device] | 116 | pointer = settings; |
1774 | 107 | { | 117 | if (!actions) // device is disabled |
1775 | 108 | dev->apply_settings(settings); | 118 | return; |
1776 | 109 | }); | 119 | actions->enqueue([settings = std::move(settings), dev=&device] |
1777 | 120 | { | ||
1778 | 121 | dev->apply_settings(settings); | ||
1779 | 122 | }); | ||
1780 | 123 | } | ||
1781 | 110 | } | 124 | } |
1782 | 111 | 125 | ||
1783 | 112 | void mi::DefaultDevice::apply_touchpad_configuration(MirTouchpadConfig const& conf) | 126 | void mi::DefaultDevice::apply_touchpad_configuration(MirTouchpadConfig const& conf) |
1784 | 113 | { | 127 | { |
1787 | 114 | if (!touchpad.is_set()) | 128 | { |
1788 | 115 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a touchpad configuration")); | 129 | std::lock_guard<std::mutex> lock(config_mutex); |
1789 | 130 | if (!touchpad.is_set()) | ||
1790 | 131 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a touchpad configuration")); | ||
1791 | 132 | } | ||
1792 | 116 | 133 | ||
1793 | 117 | if (conf.scroll_mode() & mir_touchpad_scroll_mode_button_down_scroll && | 134 | if (conf.scroll_mode() & mir_touchpad_scroll_mode_button_down_scroll && |
1794 | 118 | conf.button_down_scroll_button() == mi::no_scroll_button) | 135 | conf.button_down_scroll_button() == mi::no_scroll_button) |
1795 | @@ -127,12 +144,17 @@ | |||
1796 | 127 | settings.tap_to_click = conf.tap_to_click(); | 144 | settings.tap_to_click = conf.tap_to_click(); |
1797 | 128 | settings.middle_mouse_button_emulation = conf.middle_mouse_button_emulation(); | 145 | settings.middle_mouse_button_emulation = conf.middle_mouse_button_emulation(); |
1798 | 129 | 146 | ||
1800 | 130 | touchpad = settings; | 147 | { |
1801 | 148 | std::lock_guard<std::mutex> lock(config_mutex); | ||
1802 | 149 | touchpad = settings; | ||
1803 | 131 | 150 | ||
1806 | 132 | actions->enqueue([settings = std::move(settings), dev=&device] | 151 | if (!actions) // device is disabled |
1807 | 133 | { | 152 | return; |
1808 | 153 | actions->enqueue([settings = std::move(settings), dev=&device] | ||
1809 | 154 | { | ||
1810 | 134 | dev->apply_settings(settings); | 155 | dev->apply_settings(settings); |
1812 | 135 | }); | 156 | }); |
1813 | 157 | } | ||
1814 | 136 | } | 158 | } |
1815 | 137 | 159 | ||
1816 | 138 | mir::optional_value<MirKeyboardConfig> mi::DefaultDevice::keyboard_configuration() const | 160 | mir::optional_value<MirKeyboardConfig> mi::DefaultDevice::keyboard_configuration() const |
1817 | @@ -145,9 +167,18 @@ | |||
1818 | 145 | if (!contains(info.capabilities, mi::DeviceCapability::keyboard)) | 167 | if (!contains(info.capabilities, mi::DeviceCapability::keyboard)) |
1819 | 146 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a keyboard configuration")); | 168 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot apply a keyboard configuration")); |
1820 | 147 | 169 | ||
1821 | 170 | std::lock_guard<std::mutex> lock(config_mutex); | ||
1822 | 171 | if (!actions) // device is disabled | ||
1823 | 172 | return; | ||
1824 | 148 | if (keyboard.value().device_keymap() != conf.device_keymap()) | 173 | if (keyboard.value().device_keymap() != conf.device_keymap()) |
1825 | 149 | { | ||
1826 | 150 | keyboard = conf; | 174 | keyboard = conf; |
1829 | 151 | key_mapper->set_keymap_for_device(device_id, conf.device_keymap()); | 175 | else |
1830 | 152 | } | 176 | return; |
1831 | 177 | key_mapper->set_keymap_for_device(device_id, conf.device_keymap()); | ||
1832 | 178 | } | ||
1833 | 179 | |||
1834 | 180 | void mi::DefaultDevice::disable_queue() | ||
1835 | 181 | { | ||
1836 | 182 | std::lock_guard<std::mutex> lock(config_mutex); | ||
1837 | 183 | actions.reset(); | ||
1838 | 153 | } | 184 | } |
1839 | 154 | 185 | ||
1840 | === modified file 'src/server/input/default_device.h' | |||
1841 | --- src/server/input/default_device.h 2017-01-18 02:29:37 +0000 | |||
1842 | +++ src/server/input/default_device.h 2017-06-05 10:39:04 +0000 | |||
1843 | @@ -29,6 +29,7 @@ | |||
1844 | 29 | #include "mir/optional_value.h" | 29 | #include "mir/optional_value.h" |
1845 | 30 | 30 | ||
1846 | 31 | #include <memory> | 31 | #include <memory> |
1847 | 32 | #include <mutex> | ||
1848 | 32 | 33 | ||
1849 | 33 | namespace mir | 34 | namespace mir |
1850 | 34 | { | 35 | { |
1851 | @@ -58,6 +59,7 @@ | |||
1852 | 58 | void apply_touchpad_configuration(MirTouchpadConfig const&) override; | 59 | void apply_touchpad_configuration(MirTouchpadConfig const&) override; |
1853 | 59 | optional_value<MirKeyboardConfig> keyboard_configuration() const override; | 60 | optional_value<MirKeyboardConfig> keyboard_configuration() const override; |
1854 | 60 | void apply_keyboard_configuration(MirKeyboardConfig const&) override; | 61 | void apply_keyboard_configuration(MirKeyboardConfig const&) override; |
1855 | 62 | void disable_queue(); | ||
1856 | 61 | private: | 63 | private: |
1857 | 62 | MirInputDeviceId const device_id; | 64 | MirInputDeviceId const device_id; |
1858 | 63 | InputDevice& device; | 65 | InputDevice& device; |
1859 | @@ -65,8 +67,9 @@ | |||
1860 | 65 | optional_value<PointerSettings> pointer; | 67 | optional_value<PointerSettings> pointer; |
1861 | 66 | optional_value<TouchpadSettings> touchpad; | 68 | optional_value<TouchpadSettings> touchpad; |
1862 | 67 | optional_value<MirKeyboardConfig> keyboard; | 69 | optional_value<MirKeyboardConfig> keyboard; |
1864 | 68 | std::shared_ptr<dispatch::ActionQueue> const actions; | 70 | std::shared_ptr<dispatch::ActionQueue> actions; |
1865 | 69 | std::shared_ptr<KeyMapper> const key_mapper; | 71 | std::shared_ptr<KeyMapper> const key_mapper; |
1866 | 72 | std::mutex mutable config_mutex; | ||
1867 | 70 | }; | 73 | }; |
1868 | 71 | 74 | ||
1869 | 72 | } | 75 | } |
1870 | 73 | 76 | ||
1871 | === modified file 'src/server/input/default_input_device_hub.cpp' | |||
1872 | --- src/server/input/default_input_device_hub.cpp 2017-01-19 09:38:52 +0000 | |||
1873 | +++ src/server/input/default_input_device_hub.cpp 2017-06-05 10:39:04 +0000 | |||
1874 | @@ -99,15 +99,16 @@ | |||
1875 | 99 | if (it == end(devices)) | 99 | if (it == end(devices)) |
1876 | 100 | { | 100 | { |
1877 | 101 | auto id = create_new_device_id(); | 101 | auto id = create_new_device_id(); |
1879 | 102 | auto handle = std::make_shared<DefaultDevice>(id, device_queue, *device, key_mapper); | 102 | auto queue = std::make_shared<dispatch::ActionQueue>(); |
1880 | 103 | auto handle = std::make_shared<DefaultDevice>(id, queue, *device, key_mapper); | ||
1881 | 103 | // send input device info to observer loop.. | 104 | // send input device info to observer loop.. |
1882 | 104 | devices.push_back(std::make_unique<RegisteredDevice>( | 105 | devices.push_back(std::make_unique<RegisteredDevice>( |
1884 | 105 | device, id, input_dispatchable, cookie_authority, handle)); | 106 | device, handle->id(), queue, cookie_authority, handle)); |
1885 | 106 | 107 | ||
1886 | 107 | auto const& dev = devices.back(); | 108 | auto const& dev = devices.back(); |
1887 | 108 | 109 | ||
1888 | 109 | seat->add_device(*handle); | 110 | seat->add_device(*handle); |
1890 | 110 | dev->start(seat); | 111 | dev->start(seat, input_dispatchable); |
1891 | 111 | 112 | ||
1892 | 112 | // pass input device handle to observer loop.. | 113 | // pass input device handle to observer loop.. |
1893 | 113 | observer_queue->enqueue(this, | 114 | observer_queue->enqueue(this, |
1894 | @@ -115,7 +116,6 @@ | |||
1895 | 115 | { | 116 | { |
1896 | 116 | add_device_handle(handle); | 117 | add_device_handle(handle); |
1897 | 117 | }); | 118 | }); |
1898 | 118 | |||
1899 | 119 | } | 119 | } |
1900 | 120 | else | 120 | else |
1901 | 121 | { | 121 | { |
1902 | @@ -140,7 +140,7 @@ | |||
1903 | 140 | if (seat) | 140 | if (seat) |
1904 | 141 | { | 141 | { |
1905 | 142 | seat->remove_device(*item->handle); | 142 | seat->remove_device(*item->handle); |
1907 | 143 | item->stop(); | 143 | item->stop(input_dispatchable); |
1908 | 144 | } | 144 | } |
1909 | 145 | // send input device info to observer queue.. | 145 | // send input device info to observer queue.. |
1910 | 146 | observer_queue->enqueue( | 146 | observer_queue->enqueue( |
1911 | @@ -166,14 +166,14 @@ | |||
1912 | 166 | mi::DefaultInputDeviceHub::RegisteredDevice::RegisteredDevice( | 166 | mi::DefaultInputDeviceHub::RegisteredDevice::RegisteredDevice( |
1913 | 167 | std::shared_ptr<InputDevice> const& dev, | 167 | std::shared_ptr<InputDevice> const& dev, |
1914 | 168 | MirInputDeviceId device_id, | 168 | MirInputDeviceId device_id, |
1916 | 169 | std::shared_ptr<dispatch::MultiplexingDispatchable> const& multiplexer, | 169 | std::shared_ptr<dispatch::ActionQueue> const& queue, |
1917 | 170 | std::shared_ptr<mir::cookie::Authority> const& cookie_authority, | 170 | std::shared_ptr<mir::cookie::Authority> const& cookie_authority, |
1918 | 171 | std::shared_ptr<mi::DefaultDevice> const& handle) | 171 | std::shared_ptr<mi::DefaultDevice> const& handle) |
1919 | 172 | : handle(handle), | 172 | : handle(handle), |
1920 | 173 | device_id(device_id), | 173 | device_id(device_id), |
1921 | 174 | cookie_authority(cookie_authority), | 174 | cookie_authority(cookie_authority), |
1922 | 175 | device(dev), | 175 | device(dev), |
1924 | 176 | multiplexer(multiplexer) | 176 | queue(queue) |
1925 | 177 | { | 177 | { |
1926 | 178 | } | 178 | } |
1927 | 179 | 179 | ||
1928 | @@ -206,17 +206,23 @@ | |||
1929 | 206 | return dev == device; | 206 | return dev == device; |
1930 | 207 | } | 207 | } |
1931 | 208 | 208 | ||
1933 | 209 | void mi::DefaultInputDeviceHub::RegisteredDevice::start(std::shared_ptr<Seat> const& seat) | 209 | void mi::DefaultInputDeviceHub::RegisteredDevice::start(std::shared_ptr<Seat> const& seat, std::shared_ptr<dispatch::MultiplexingDispatchable> const& multiplexer) |
1934 | 210 | { | 210 | { |
1935 | 211 | multiplexer->add_watch(queue); | ||
1936 | 212 | |||
1937 | 211 | this->seat = seat; | 213 | this->seat = seat; |
1938 | 212 | builder = std::make_unique<DefaultEventBuilder>(device_id, cookie_authority, seat); | 214 | builder = std::make_unique<DefaultEventBuilder>(device_id, cookie_authority, seat); |
1939 | 213 | device->start(this, builder.get()); | 215 | device->start(this, builder.get()); |
1940 | 214 | } | 216 | } |
1941 | 215 | 217 | ||
1943 | 216 | void mi::DefaultInputDeviceHub::RegisteredDevice::stop() | 218 | void mi::DefaultInputDeviceHub::RegisteredDevice::stop(std::shared_ptr<dispatch::MultiplexingDispatchable> const& multiplexer) |
1944 | 217 | { | 219 | { |
1945 | 220 | multiplexer->remove_watch(queue); | ||
1946 | 221 | handle->disable_queue(); | ||
1947 | 222 | |||
1948 | 218 | device->stop(); | 223 | device->stop(); |
1949 | 219 | seat = nullptr; | 224 | seat = nullptr; |
1950 | 225 | queue.reset(); | ||
1951 | 220 | builder.reset(); | 226 | builder.reset(); |
1952 | 221 | } | 227 | } |
1953 | 222 | 228 | ||
1954 | 223 | 229 | ||
1955 | === modified file 'src/server/input/default_input_device_hub.h' | |||
1956 | --- src/server/input/default_input_device_hub.h 2017-01-19 09:38:52 +0000 | |||
1957 | +++ src/server/input/default_input_device_hub.h 2017-06-05 10:39:04 +0000 | |||
1958 | @@ -90,6 +90,7 @@ | |||
1959 | 90 | void device_changed(Device* dev); | 90 | void device_changed(Device* dev); |
1960 | 91 | void emit_changed_devices(); | 91 | void emit_changed_devices(); |
1961 | 92 | MirInputDeviceId create_new_device_id(); | 92 | MirInputDeviceId create_new_device_id(); |
1962 | 93 | |||
1963 | 93 | std::shared_ptr<Seat> const seat; | 94 | std::shared_ptr<Seat> const seat; |
1964 | 94 | std::shared_ptr<frontend::EventSink> const sink; | 95 | std::shared_ptr<frontend::EventSink> const sink; |
1965 | 95 | std::shared_ptr<dispatch::MultiplexingDispatchable> const input_dispatchable; | 96 | std::shared_ptr<dispatch::MultiplexingDispatchable> const input_dispatchable; |
1966 | @@ -105,14 +106,14 @@ | |||
1967 | 105 | public: | 106 | public: |
1968 | 106 | RegisteredDevice(std::shared_ptr<InputDevice> const& dev, | 107 | RegisteredDevice(std::shared_ptr<InputDevice> const& dev, |
1969 | 107 | MirInputDeviceId dev_id, | 108 | MirInputDeviceId dev_id, |
1971 | 108 | std::shared_ptr<dispatch::MultiplexingDispatchable> const& multiplexer, | 109 | std::shared_ptr<dispatch::ActionQueue> const& multiplexer, |
1972 | 109 | std::shared_ptr<cookie::Authority> const& cookie_authority, | 110 | std::shared_ptr<cookie::Authority> const& cookie_authority, |
1973 | 110 | std::shared_ptr<DefaultDevice> const& handle); | 111 | std::shared_ptr<DefaultDevice> const& handle); |
1974 | 111 | void handle_input(MirEvent& event) override; | 112 | void handle_input(MirEvent& event) override; |
1975 | 112 | mir::geometry::Rectangle bounding_rectangle() const override; | 113 | mir::geometry::Rectangle bounding_rectangle() const override; |
1976 | 113 | bool device_matches(std::shared_ptr<InputDevice> const& dev) const; | 114 | bool device_matches(std::shared_ptr<InputDevice> const& dev) const; |
1979 | 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); |
1980 | 115 | void stop(); | 116 | void stop(std::shared_ptr<dispatch::MultiplexingDispatchable> const& dispatchable); |
1981 | 116 | MirInputDeviceId id(); | 117 | MirInputDeviceId id(); |
1982 | 117 | std::shared_ptr<Seat> seat; | 118 | std::shared_ptr<Seat> seat; |
1983 | 118 | const std::shared_ptr<DefaultDevice> handle; | 119 | const std::shared_ptr<DefaultDevice> handle; |
1984 | @@ -124,7 +125,7 @@ | |||
1985 | 124 | std::unique_ptr<DefaultEventBuilder> builder; | 125 | std::unique_ptr<DefaultEventBuilder> builder; |
1986 | 125 | std::shared_ptr<cookie::Authority> cookie_authority; | 126 | std::shared_ptr<cookie::Authority> cookie_authority; |
1987 | 126 | std::shared_ptr<InputDevice> const device; | 127 | std::shared_ptr<InputDevice> const device; |
1989 | 127 | std::shared_ptr<dispatch::MultiplexingDispatchable> const multiplexer; | 128 | std::shared_ptr<dispatch::ActionQueue> queue; |
1990 | 128 | }; | 129 | }; |
1991 | 129 | 130 | ||
1992 | 130 | std::vector<std::shared_ptr<Device>> handles; | 131 | std::vector<std::shared_ptr<Device>> handles; |
1993 | 131 | 132 | ||
1994 | === modified file 'tests/unit-tests/input/test_default_device.cpp' | |||
1995 | --- tests/unit-tests/input/test_default_device.cpp 2017-01-18 02:29:37 +0000 | |||
1996 | +++ tests/unit-tests/input/test_default_device.cpp 2017-06-05 10:39:04 +0000 | |||
1997 | @@ -155,3 +155,26 @@ | |||
1998 | 155 | 155 | ||
1999 | 156 | queue->dispatch(md::FdEvent::readable); | 156 | queue->dispatch(md::FdEvent::readable); |
2000 | 157 | } | 157 | } |
2001 | 158 | |||
2002 | 159 | TEST_F(DefaultDevice, disable_queue_ends_config_processing) | ||
2003 | 160 | { | ||
2004 | 161 | mi::DefaultDevice dev(MirInputDeviceId{17}, queue, touchpad, mt::fake_shared(key_mapper)); | ||
2005 | 162 | |||
2006 | 163 | dev.disable_queue(); | ||
2007 | 164 | MirPointerConfig pointer_conf; | ||
2008 | 165 | pointer_conf.cursor_acceleration_bias(1.0); | ||
2009 | 166 | |||
2010 | 167 | EXPECT_CALL(touchpad, apply_settings(Matcher<mi::TouchpadSettings const&>(_))).Times(0); | ||
2011 | 168 | dev.apply_pointer_configuration(pointer_conf); | ||
2012 | 169 | } | ||
2013 | 170 | |||
2014 | 171 | TEST_F(DefaultDevice, disable_queue_removes_reference_to_queue) | ||
2015 | 172 | { | ||
2016 | 173 | std::weak_ptr<md::ActionQueue> ref = queue; | ||
2017 | 174 | mi::DefaultDevice dev(MirInputDeviceId{17}, queue, touchpad, mt::fake_shared(key_mapper)); | ||
2018 | 175 | queue.reset(); | ||
2019 | 176 | |||
2020 | 177 | EXPECT_THAT(ref.lock(), Ne(nullptr)); | ||
2021 | 178 | dev.disable_queue(); | ||
2022 | 179 | EXPECT_THAT(ref.lock(), Eq(nullptr)); | ||
2023 | 180 | } | ||
2024 | 158 | 181 | ||
2025 | === modified file 'tests/unit-tests/input/test_default_input_device_hub.cpp' | |||
2026 | --- tests/unit-tests/input/test_default_input_device_hub.cpp 2017-01-19 09:38:52 +0000 | |||
2027 | +++ tests/unit-tests/input/test_default_input_device_hub.cpp 2017-06-05 10:39:04 +0000 | |||
2028 | @@ -236,3 +236,21 @@ | |||
2029 | 236 | observer_loop.trigger_server_actions(); | 236 | observer_loop.trigger_server_actions(); |
2030 | 237 | } | 237 | } |
2031 | 238 | 238 | ||
2032 | 239 | TEST_F(InputDeviceHubTest, no_device_config_action_after_device_removal) | ||
2033 | 240 | { | ||
2034 | 241 | std::shared_ptr<mi::Device> dev_ptr; | ||
2035 | 242 | MirPointerConfig ptr_config; | ||
2036 | 243 | ptr_config.cursor_acceleration_bias(0.5); | ||
2037 | 244 | |||
2038 | 245 | ON_CALL(mock_observer, device_added(WithName("mouse"))).WillByDefault(SaveArg<0>(&dev_ptr)); | ||
2039 | 246 | |||
2040 | 247 | hub.add_device(mt::fake_shared(mouse)); | ||
2041 | 248 | hub.add_observer(mt::fake_shared(mock_observer)); | ||
2042 | 249 | observer_loop.trigger_server_actions(); | ||
2043 | 250 | |||
2044 | 251 | EXPECT_CALL(mouse, apply_settings(Matcher<mi::PointerSettings const&>(_))).Times(0); | ||
2045 | 252 | |||
2046 | 253 | dev_ptr->apply_pointer_configuration(ptr_config); | ||
2047 | 254 | hub.remove_device(mt::fake_shared(mouse)); | ||
2048 | 255 | observer_loop.trigger_server_actions(); | ||
2049 | 256 | } |
LGTMa