Whitelist window states to persist on ASH app windows.
[chromium-blink-merge.git] / ppapi / api / pp_rect.idl
blobf342ab0e96a955e013430c4a967e6b969c288102
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 /**
7 * This file defines the APIs for creating a 2 dimensional rectangle.
8 */
10 /**
11 * The <code>PP_Rect</code> struct contains the size and location of a 2D
12 * rectangle.
14 [assert_size(16)]
15 struct PP_Rect {
16 /**
17 * This value represents the x and y coordinates of the upper-left corner of
18 * the rectangle.
20 PP_Point point;
22 /** This value represents the width and height of the rectangle. */
23 PP_Size size;
26 #inline c
28 /**
29 * @addtogroup Functions
30 * @{
33 /**
34 * PP_MakeRectFromXYWH() creates a <code>PP_Rect</code> given x and y
35 * coordinates and width and height dimensions as int32_t values.
37 * @param[in] x An int32_t value representing a horizontal coordinate of a
38 * point, starting with 0 as the left-most coordinate.
39 * @param[in] y An int32_t value representing a vertical coordinate of a point,
40 * starting with 0 as the top-most coordinate.
41 * @param[in] w An int32_t value representing a width.
42 * @param[in] h An int32_t value representing a height.
44 * @return A <code>PP_Rect</code> structure.
46 PP_INLINE struct PP_Rect PP_MakeRectFromXYWH(int32_t x, int32_t y,
47 int32_t w, int32_t h) {
48 struct PP_Rect ret;
49 ret.point.x = x;
50 ret.point.y = y;
51 ret.size.width = w;
52 ret.size.height = h;
53 return ret;
55 /**
56 * @}
59 #endinl