| 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 #ifndef PPAPI_C_PP_SIZE_H_ | 5 #ifndef PPAPI_C_PP_SIZE_H_ |
| 6 #define PPAPI_C_PP_SIZE_H_ | 6 #define PPAPI_C_PP_SIZE_H_ |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * @file | 9 * @file |
| 10 * This file defines the width and height of a 2 dimensional rectangle. | 10 * This file defines the width and height of a 2D rectangle. |
| 11 */ | 11 */ |
| 12 | 12 |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_stdint.h" | 14 #include "ppapi/c/pp_stdint.h" |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * @addtogroup Structs | 17 * @addtogroup Structs |
| 18 * @{ | 18 * @{ |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * The PP_Size struct contains the size of a 2D rectangle. | 22 * The <code>PP_Size</code> struct contains the size of a 2D rectangle. |
| 23 */ | 23 */ |
| 24 struct PP_Size { | 24 struct PP_Size { |
| 25 /** This value represents the width of the rectangle. */ | 25 /** This value represents the width of the rectangle. */ |
| 26 int32_t width; | 26 int32_t width; |
| 27 /** This value represents the height of the rectangle. */ | 27 /** This value represents the height of the rectangle. */ |
| 28 int32_t height; | 28 int32_t height; |
| 29 }; | 29 }; |
| 30 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Size, 8); | 30 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Size, 8); |
| 31 /** | 31 /** |
| 32 * @} | 32 * @} |
| 33 */ | 33 */ |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * @addtogroup Functions | 36 * @addtogroup Functions |
| 37 * @{ | 37 * @{ |
| 38 */ | 38 */ |
| 39 | 39 |
| 40 /** | 40 /** |
| 41 * PP_MakeSize() creates a PP_Size given a width and height as int32_t values. | 41 * This function creates a <code>PP_Size</code> given a width and height as |
| 42 * int32_t values. |
| 42 * @param[in] w An int32_t value representing a width. | 43 * @param[in] w An int32_t value representing a width. |
| 43 * @param[in] h An int32_t value representing a height. | 44 * @param[in] h An int32_t value representing a height. |
| 44 * @return A PP_Size structure. | 45 * @return A <code>PP_Size</code> structure. |
| 45 */ | 46 */ |
| 46 PP_INLINE struct PP_Size PP_MakeSize(int32_t w, int32_t h) { | 47 PP_INLINE struct PP_Size PP_MakeSize(int32_t w, int32_t h) { |
| 47 struct PP_Size ret; | 48 struct PP_Size ret; |
| 48 ret.width = w; | 49 ret.width = w; |
| 49 ret.height = h; | 50 ret.height = h; |
| 50 return ret; | 51 return ret; |
| 51 } | 52 } |
| 52 /** | 53 /** |
| 53 * @} | 54 * @} |
| 54 */ | 55 */ |
| 55 #endif /* PPAPI_C_PP_SIZE_H_ */ | 56 #endif /* PPAPI_C_PP_SIZE_H_ */ |
| 56 | 57 |
| OLD | NEW |