| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2013-2014 Collabora, Ltd. | 2 * Copyright © 2013-2014 Collabora, Ltd. |
| 3 * | 3 * |
| 4 * Permission is hereby granted, free of charge, to any person obtaining a | 4 * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 * copy of this software and associated documentation files (the "Software"), | 5 * copy of this software and associated documentation files (the "Software"), |
| 6 * to deal in the Software without restriction, including without limitation | 6 * to deal in the Software without restriction, including without limitation |
| 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 * and/or sell copies of the Software, and to permit persons to whom the | 8 * and/or sell copies of the Software, and to permit persons to whom the |
| 9 * Software is furnished to do so, subject to the following conditions: | 9 * Software is furnished to do so, subject to the following conditions: |
| 10 * | 10 * |
| 11 * The above copyright notice and this permission notice (including the next | 11 * The above copyright notice and this permission notice (including the next |
| 12 * paragraph) shall be included in all copies or substantial portions of the | 12 * paragraph) shall be included in all copies or substantial portions of the |
| 13 * Software. | 13 * Software. |
| 14 * | 14 * |
| 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 21 * DEALINGS IN THE SOFTWARE. | 21 * DEALINGS IN THE SOFTWARE. |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 #ifndef SCALER_SERVER_PROTOCOL_H | 24 #ifndef SCALER_SERVER_PROTOCOL_H |
| 25 #define SCALER_SERVER_PROTOCOL_H | 25 #define SCALER_SERVER_PROTOCOL_H |
| 26 | 26 |
| 27 #ifdef __cplusplus | 27 #ifdef __cplusplus |
| 28 extern "C" { | 28 extern "C" { |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 #include <stdint.h> | 31 #include <stdint.h> |
| 32 #include <stddef.h> | 32 #include <stddef.h> |
| 33 #include "wayland-util.h" | 33 #include "wayland-server.h" |
| 34 | 34 |
| 35 struct wl_client; | 35 struct wl_client; |
| 36 struct wl_resource; | 36 struct wl_resource; |
| 37 | 37 |
| 38 struct wl_scaler; | 38 struct wl_scaler; |
| 39 struct wl_surface; |
| 39 struct wl_viewport; | 40 struct wl_viewport; |
| 40 | 41 |
| 41 extern const struct wl_interface wl_scaler_interface; | 42 extern const struct wl_interface wl_scaler_interface; |
| 42 extern const struct wl_interface wl_viewport_interface; | 43 extern const struct wl_interface wl_viewport_interface; |
| 43 | 44 |
| 44 #ifndef WL_SCALER_ERROR_ENUM | 45 #ifndef WL_SCALER_ERROR_ENUM |
| 45 #define WL_SCALER_ERROR_ENUM | 46 #define WL_SCALER_ERROR_ENUM |
| 46 enum wl_scaler_error { | 47 enum wl_scaler_error { |
| 47 WL_SCALER_ERROR_VIEWPORT_EXISTS = 0, | 48 WL_SCALER_ERROR_VIEWPORT_EXISTS = 0, |
| 48 }; | 49 }; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 78 * crop and scale its content. If the given wl_surface already has | 79 * crop and scale its content. If the given wl_surface already has |
| 79 * a wl_viewport object associated, the viewport_exists protocol | 80 * a wl_viewport object associated, the viewport_exists protocol |
| 80 * error is raised. | 81 * error is raised. |
| 81 */ | 82 */ |
| 82 void (*get_viewport)(struct wl_client *client, | 83 void (*get_viewport)(struct wl_client *client, |
| 83 struct wl_resource *resource, | 84 struct wl_resource *resource, |
| 84 uint32_t id, | 85 uint32_t id, |
| 85 struct wl_resource *surface); | 86 struct wl_resource *surface); |
| 86 }; | 87 }; |
| 87 | 88 |
| 89 |
| 88 #ifndef WL_VIEWPORT_ERROR_ENUM | 90 #ifndef WL_VIEWPORT_ERROR_ENUM |
| 89 #define WL_VIEWPORT_ERROR_ENUM | 91 #define WL_VIEWPORT_ERROR_ENUM |
| 90 enum wl_viewport_error { | 92 enum wl_viewport_error { |
| 91 WL_VIEWPORT_ERROR_BAD_VALUE = 0, | 93 WL_VIEWPORT_ERROR_BAD_VALUE = 0, |
| 92 }; | 94 }; |
| 93 #endif /* WL_VIEWPORT_ERROR_ENUM */ | 95 #endif /* WL_VIEWPORT_ERROR_ENUM */ |
| 94 | 96 |
| 95 /** | 97 /** |
| 96 * wl_viewport - crop and scale interface to a wl_surface | 98 * wl_viewport - crop and scale interface to a wl_surface |
| 97 * @destroy: remove scaling and cropping from the surface | 99 * @destroy: remove scaling and cropping from the surface |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 * surface-local coordinate system irrespective of the attached | 242 * surface-local coordinate system irrespective of the attached |
| 241 * wl_buffer size. | 243 * wl_buffer size. |
| 242 * @since: 2 | 244 * @since: 2 |
| 243 */ | 245 */ |
| 244 void (*set_destination)(struct wl_client *client, | 246 void (*set_destination)(struct wl_client *client, |
| 245 struct wl_resource *resource, | 247 struct wl_resource *resource, |
| 246 int32_t width, | 248 int32_t width, |
| 247 int32_t height); | 249 int32_t height); |
| 248 }; | 250 }; |
| 249 | 251 |
| 252 |
| 250 #ifdef __cplusplus | 253 #ifdef __cplusplus |
| 251 } | 254 } |
| 252 #endif | 255 #endif |
| 253 | 256 |
| 254 #endif | 257 #endif |
| OLD | NEW |