| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 |
| 6 /* From pp_rect.idl modified Sat Jul 16 16:50:26 2011. */ |
| 7 |
| 5 #ifndef PPAPI_C_PP_RECT_H_ | 8 #ifndef PPAPI_C_PP_RECT_H_ |
| 6 #define PPAPI_C_PP_RECT_H_ | 9 #define PPAPI_C_PP_RECT_H_ |
| 7 | 10 |
| 8 /** | |
| 9 * @file | |
| 10 * This file defines the APIs for creating a 2 dimensional rectangle. | |
| 11 */ | |
| 12 | |
| 13 #include "ppapi/c/pp_macros.h" | 11 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_point.h" | 12 #include "ppapi/c/pp_point.h" |
| 15 #include "ppapi/c/pp_size.h" | 13 #include "ppapi/c/pp_size.h" |
| 16 #include "ppapi/c/pp_stdint.h" | 14 #include "ppapi/c/pp_stdint.h" |
| 17 | 15 |
| 18 /** | 16 /** |
| 17 * @file |
| 18 * This file defines the APIs for creating a 2 dimensional rectangle. |
| 19 */ |
| 20 |
| 21 |
| 22 /** |
| 19 * @addtogroup Structs | 23 * @addtogroup Structs |
| 20 * @{ | 24 * @{ |
| 21 */ | 25 */ |
| 22 | |
| 23 /** | 26 /** |
| 24 * The <code>PP_Rect</code> struct contains the size and location of a 2D | 27 * The <code>PP_Rect</code> struct contains the size and location of a 2D |
| 25 * rectangle. | 28 * rectangle. |
| 26 */ | 29 */ |
| 27 struct PP_Rect { | 30 struct PP_Rect { |
| 28 | |
| 29 /** | 31 /** |
| 30 * This value represents the x and y coordinates of the upper-left corner of | 32 * This value represents the x and y coordinates of the upper-left corner of |
| 31 * the rectangle. | 33 * the rectangle. |
| 32 */ | 34 */ |
| 33 struct PP_Point point; | 35 struct PP_Point point; |
| 34 | |
| 35 /** This value represents the width and height of the rectangle. */ | 36 /** This value represents the width and height of the rectangle. */ |
| 36 struct PP_Size size; | 37 struct PP_Size size; |
| 37 }; | 38 }; |
| 38 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Rect, 16); | 39 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Rect, 16); |
| 39 /** | 40 /** |
| 40 * @} | 41 * @} |
| 41 */ | 42 */ |
| 42 | 43 |
| 44 |
| 43 /** | 45 /** |
| 44 * @addtogroup Functions | 46 * @addtogroup Functions |
| 45 * @{ | 47 * @{ |
| 46 */ | 48 */ |
| 47 | 49 |
| 48 /** | 50 /** |
| 49 * PP_MakeRectFromXYWH() creates a <code>PP_Rect</code> given x and y | 51 * PP_MakeRectFromXYWH() creates a <code>PP_Rect</code> given x and y |
| 50 * coordinates and width and height dimensions as int32_t values. | 52 * coordinates and width and height dimensions as int32_t values. |
| 51 * | 53 * |
| 52 * @param[in] x An int32_t value representing a horizontal coordinate of a | 54 * @param[in] x An int32_t value representing a horizontal coordinate of a |
| (...skipping 10 matching lines...) Expand all Loading... |
| 63 struct PP_Rect ret; | 65 struct PP_Rect ret; |
| 64 ret.point.x = x; | 66 ret.point.x = x; |
| 65 ret.point.y = y; | 67 ret.point.y = y; |
| 66 ret.size.width = w; | 68 ret.size.width = w; |
| 67 ret.size.height = h; | 69 ret.size.height = h; |
| 68 return ret; | 70 return ret; |
| 69 } | 71 } |
| 70 /** | 72 /** |
| 71 * @} | 73 * @} |
| 72 */ | 74 */ |
| 75 |
| 73 #endif /* PPAPI_C_PP_RECT_H_ */ | 76 #endif /* PPAPI_C_PP_RECT_H_ */ |
| 74 | 77 |
| OLD | NEW |