diff options
author | noelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-16 23:53:22 +0000 |
---|---|---|
committer | noelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-16 23:53:22 +0000 |
commit | 745b0d43a1f129f008ec1cdf50cb7afedeba1f02 (patch) | |
tree | bc84c5f95a643f85ce5d70967e1075a577dc999f /ppapi/api/pp_point.idl | |
parent | 63e26829823d96127ad24eabbca69e4d6008d7aa (diff) | |
download | chromium_src-745b0d43a1f129f008ec1cdf50cb7afedeba1f02.zip chromium_src-745b0d43a1f129f008ec1cdf50cb7afedeba1f02.tar.gz chromium_src-745b0d43a1f129f008ec1cdf50cb7afedeba1f02.tar.bz2 |
Update the IDL
Final update of the IDL so that we can switch to using
generated code for ppapi/c/ and ppapi/c/trusted.
BUG= http://code.google.com/p/chromium/issues/detail?id=74634
TEST= tryserver
TBR= dmichael@chromium.org
Review URL: http://codereview.chromium.org/7390023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92805 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api/pp_point.idl')
-rw-r--r-- | ppapi/api/pp_point.idl | 64 |
1 files changed, 58 insertions, 6 deletions
diff --git a/ppapi/api/pp_point.idl b/ppapi/api/pp_point.idl index 37aeca7..8568218 100644 --- a/ppapi/api/pp_point.idl +++ b/ppapi/api/pp_point.idl @@ -3,18 +3,70 @@ * found in the LICENSE file. */ -/* This file defines the API to create a 2 dimensional point. +/** + * This file defines the API to create a 2 dimensional point. * 0,0 is the upper-left starting coordinate. */ -/* The PP_Point structure defines the x and y coordinates of a point. */ +/** + * The PP_Point structure defines the integer x and y coordinates of a point. + */ +[assert_size(8), returnByValue] struct PP_Point { - /* The horizontal coordinate of a point, starting with 0 as the left-most - * coordinate. + /** + * This value represents the horizontal coordinate of a point, starting with 0 + * as the left-most coordinate. */ int32_t x; - /* The vertical coordinate of a point, starting with 0 as the top-most - * coordinate. + + /** + * This value represents the vertical coordinate of a point, starting with 0 + * as the top-most coordinate. */ int32_t y; }; + +/** + * The PP_FloatPoint structure defines the floating-point x and y coordinates + * of a point. + */ +[assert_size(8), returnByValue] +struct PP_FloatPoint { + float_t x; + float_t y; +}; + +#inline c +/** + * @addtogroup Functions + * @{ + */ + +/** + * PP_MakePoint() creates a <code>PP_Point</code> given the x and y coordinates + * as int32_t values. + * @param[in] x An int32_t value representing a horizontal coordinate of a + * point, starting with 0 as the left-most coordinate. + * @param[in] y An int32_t value representing a vertical coordinate of a point, + * starting with 0 as the top-most coordinate. + * @return A <code>PP_Point</code> structure. + */ +PP_INLINE struct PP_Point PP_MakePoint(int32_t x, int32_t y) { + struct PP_Point ret; + ret.x = x; + ret.y = y; + return ret; +} + +PP_INLINE struct PP_FloatPoint PP_MakeFloatPoint(float x, float y) { + struct PP_FloatPoint ret; + ret.x = x; + ret.y = y; + return ret; +} +/** + * @} + */ + +#endinl + |