cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / ppapi / api / pp_point.idl
blob7be466f0ef0d9e3269a8a5be196c9c416ac68a77
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 API to create a 2 dimensional point.
8 * 0,0 is the upper-left starting coordinate.
9 */
11 /**
12 * The PP_Point structure defines the integer x and y coordinates of a point.
14 [assert_size(8), returnByValue]
15 struct PP_Point {
16 /**
17 * This value represents the horizontal coordinate of a point, starting with 0
18 * as the left-most coordinate.
20 int32_t x;
22 /**
23 * This value represents the vertical coordinate of a point, starting with 0
24 * as the top-most coordinate.
26 int32_t y;
29 /**
30 * The PP_FloatPoint structure defines the floating-point x and y coordinates
31 * of a point.
33 [assert_size(8), returnByValue]
34 struct PP_FloatPoint {
35 float_t x;
36 float_t y;
39 #inline c
40 /**
41 * @addtogroup Functions
42 * @{
45 /**
46 * PP_MakePoint() creates a <code>PP_Point</code> given the x and y coordinates
47 * as int32_t values.
49 * @param[in] x An int32_t value representing a horizontal coordinate of a
50 * point, starting with 0 as the left-most coordinate.
51 * @param[in] y An int32_t value representing a vertical coordinate of a point,
52 * starting with 0 as the top-most coordinate.
54 * @return A <code>PP_Point</code> structure.
56 PP_INLINE struct PP_Point PP_MakePoint(int32_t x, int32_t y) {
57 struct PP_Point ret;
58 ret.x = x;
59 ret.y = y;
60 return ret;
63 PP_INLINE struct PP_FloatPoint PP_MakeFloatPoint(float x, float y) {
64 struct PP_FloatPoint ret;
65 ret.x = x;
66 ret.y = y;
67 return ret;
69 /**
70 * @}
73 #endinl