1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
6 /* From pp_size.idl modified Tue Jun 3 12:31:20 2014. */
8 #ifndef PPAPI_C_PP_SIZE_H_
9 #define PPAPI_C_PP_SIZE_H_
11 #include "ppapi/c/pp_macros.h"
12 #include "ppapi/c/pp_stdint.h"
16 * This file defines the width and height of a 2D rectangle.
25 * The <code>PP_Size</code> struct contains the size of a 2D rectangle.
28 /** This value represents the width of the rectangle. */
30 /** This value represents the height of the rectangle. */
33 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Size
, 8);
36 * The <code>PP_FloatSize</code> struct contains the size of a 2D rectangle.
39 /** This value represents the width of the rectangle. */
41 /** This value represents the height of the rectangle. */
49 * @addtogroup Functions
54 * PP_MakeSize() creates a <code>PP_Size</code> given a width and height as
57 * @param[in] w An int32_t value representing a width.
58 * @param[in] h An int32_t value representing a height.
60 * @return A <code>PP_Size</code> structure.
62 PP_INLINE
struct PP_Size
PP_MakeSize(int32_t w
, int32_t h
) {
70 * PP_MakeFloatSize() creates a <code>PP_FloatSize</code> given a
71 * width and height as float values.
73 * @param[in] w An float value representing a width.
74 * @param[in] h An float value representing a height.
76 * @return A <code>PP_FloatSize</code> structure.
78 PP_INLINE
struct PP_FloatSize
PP_MakeFloatSize(float w
, float h
) {
79 struct PP_FloatSize ret
;
87 #endif /* PPAPI_C_PP_SIZE_H_ */