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