[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / ppapi / c / pp_size.h
blob117369cb9f89e8315c094aa4dcdb605217c079d2
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.
4 */
6 /* From pp_size.idl modified Wed Oct 5 14:06:02 2011. */
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"
14 /**
15 * @file
16 * This file defines the width and height of a 2D rectangle.
20 /**
21 * @addtogroup Structs
22 * @{
24 /**
25 * The <code>PP_Size</code> struct contains the size of a 2D rectangle.
27 struct PP_Size {
28 /** This value represents the width of the rectangle. */
29 int32_t width;
30 /** This value represents the height of the rectangle. */
31 int32_t height;
33 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Size, 8);
34 /**
35 * @}
38 /**
39 * @addtogroup Functions
40 * @{
43 /**
44 * PP_MakeSize() creates a <code>PP_Size</code> given a width and height as
45 * int32_t values.
47 * @param[in] w An int32_t value representing a width.
48 * @param[in] h An int32_t value representing a height.
50 * @return A <code>PP_Size</code> structure.
52 PP_INLINE struct PP_Size PP_MakeSize(int32_t w, int32_t h) {
53 struct PP_Size ret;
54 ret.width = w;
55 ret.height = h;
56 return ret;
58 /**
59 * @}
61 #endif /* PPAPI_C_PP_SIZE_H_ */