OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_C_PP_RECT_H_ | 5 #ifndef PPAPI_C_PP_RECT_H_ |
6 #define PPAPI_C_PP_RECT_H_ | 6 #define PPAPI_C_PP_RECT_H_ |
7 | 7 |
8 /** | 8 /** |
9 * @file | 9 * @file |
10 * Defines the API ... | 10 * Defines the API ... |
11 * | 11 * |
12 * @addtogroup PP | 12 * @addtogroup PP |
13 * @{ | 13 * @{ |
14 */ | 14 */ |
15 | 15 |
| 16 #include "ppapi/c/pp_macros.h" |
16 #include "ppapi/c/pp_point.h" | 17 #include "ppapi/c/pp_point.h" |
17 #include "ppapi/c/pp_size.h" | 18 #include "ppapi/c/pp_size.h" |
18 #include "ppapi/c/pp_stdint.h" | 19 #include "ppapi/c/pp_stdint.h" |
19 | 20 |
20 struct PP_Rect { | 21 struct PP_Rect { |
21 struct PP_Point point; | 22 struct PP_Point point; |
22 struct PP_Size size; | 23 struct PP_Size size; |
23 }; | 24 }; |
24 | 25 |
25 inline struct PP_Rect PP_MakeRectFromXYWH(int32_t x, int32_t y, | 26 PP_INLINE struct PP_Rect PP_MakeRectFromXYWH(int32_t x, int32_t y, |
26 int32_t w, int32_t h) { | 27 int32_t w, int32_t h) { |
27 struct PP_Rect ret; | 28 struct PP_Rect ret; |
28 ret.point.x = x; | 29 ret.point.x = x; |
29 ret.point.y = y; | 30 ret.point.y = y; |
30 ret.size.width = w; | 31 ret.size.width = w; |
31 ret.size.height = h; | 32 ret.size.height = h; |
32 return ret; | 33 return ret; |
33 } | 34 } |
34 | 35 |
35 /** | 36 /** |
36 * @} | 37 * @} |
37 * End addtogroup PP | 38 * End addtogroup PP |
38 */ | 39 */ |
39 #endif // PPAPI_C_PP_RECT_H_ | 40 #endif // PPAPI_C_PP_RECT_H_ |
OLD | NEW |