Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: ppapi/c/pp_touch_point.h

Issue 10956037: Updated pp_touch_point.h docs in preparation for fixing the C++ docs (which are a bit lean). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/api/pp_touch_point.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /* From pp_touch_point.idl modified Thu Jun 21 16:46:17 2012. */ 6 /* From pp_touch_point.idl modified Fri Sep 21 10:18:48 2012. */
7 7
8 #ifndef PPAPI_C_PP_TOUCH_POINT_H_ 8 #ifndef PPAPI_C_PP_TOUCH_POINT_H_
9 #define PPAPI_C_PP_TOUCH_POINT_H_ 9 #define PPAPI_C_PP_TOUCH_POINT_H_
10 10
11 #include "ppapi/c/pp_macros.h" 11 #include "ppapi/c/pp_macros.h"
12 #include "ppapi/c/pp_point.h" 12 #include "ppapi/c/pp_point.h"
13 #include "ppapi/c/pp_stdint.h" 13 #include "ppapi/c/pp_stdint.h"
14 14
15 /** 15 /**
16 * @file 16 * @file
17 * This file defines the API to create a touch-point. 17 * This file defines the API to create a touch point or position where fingers
18 * makes contact with touch screen device.
18 */ 19 */
19 20
20 21
21 /** 22 /**
22 * @addtogroup Structs 23 * @addtogroup Structs
23 * @{ 24 * @{
24 */ 25 */
25 /** 26 /**
26 * The <code>PP_TouchPoint</code> represents all information about a single 27 * The <code>PP_TouchPoint</code> struct represents all information about a
27 * touch point, such ase position, id, rotation angle, and pressure. 28 * single touch point, such ase position, id, rotation angle, and pressure.
28 */ 29 */
29 struct PP_TouchPoint { 30 struct PP_TouchPoint {
30 /** 31 /**
31 * The identifier for this TouchPoint. This corresponds to the order 32 * This value represents the identifier for this TouchPoint. The id
32 * in which the points were pressed. For example, the first point to be 33 * corresponds to the order in which the points were pressed. For example,
33 * pressed has an id of 0, the second has an id of 1, and so on. An id can be 34 * the first point to be pressed has an id of 0, the second has an id of 1,
34 * reused when a touch point is released. For example, if two fingers are 35 * and so on. An id can be reused when a touch point is released. For
35 * down, with id 0 and 1, and finger 0 releases, the next finger to be 36 * example, if two fingers are down, with id 0 and 1, and finger 0 releases,
36 * pressed can be assigned to id 0. 37 * the next finger to be pressed can be assigned to id 0.
37 */ 38 */
38 uint32_t id; 39 uint32_t id;
39 /** 40 /**
40 * The x-y pixel position of this TouchPoint, relative to the upper-left of 41 * This value represents the x and y pixel position of this TouchPoint
41 * the instance receiving the event. 42 * relative to the upper-left of the module instance receiving the event.
42 */ 43 */
43 struct PP_FloatPoint position; 44 struct PP_FloatPoint position;
44 /** 45 /**
45 * The elliptical radii, in screen pixels, in the x and y direction of this 46 * This value represents the elliptical radii, in screen pixels, in the x
46 * TouchPoint. 47 * and y direction of this TouchPoint.
47 */ 48 */
48 struct PP_FloatPoint radius; 49 struct PP_FloatPoint radius;
49 /** 50 /**
50 * The angle of rotation in degrees of the elliptical model of this TouchPoint 51 * This value represents the angle of rotation in degrees of the elliptical
51 * clockwise from "up." 52 * model of this TouchPoint clockwise from "up."
52 */ 53 */
53 float rotation_angle; 54 float rotation_angle;
54 /** 55 /**
55 * The pressure applied to this TouchPoint. This is typically a 56 * This value represents the pressure applied to this TouchPoint. This value
56 * value between 0 and 1, with 0 indicating no pressure and 1 indicating 57 * is typically between 0 and 1, with 0 indicating no pressure and 1
57 * some maximum pressure, but scaling differs depending on the hardware and 58 * indicating some maximum pressure. Scaling differs depending on the
58 * the value is not guaranteed to stay within that range. 59 * hardware and the value is not guaranteed to stay within that range.
59 */ 60 */
60 float pressure; 61 float pressure;
61 }; 62 };
62 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_TouchPoint, 28); 63 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_TouchPoint, 28);
63 /** 64 /**
64 * @} 65 * @}
65 */ 66 */
66 67
67 /** 68 /**
68 * @addtogroup Functions 69 * @addtogroup Functions
69 * @{ 70 * @{
70 */ 71 */
71 72
72 /** 73 /**
73 * PP_MakeTouchPoint() creates a <code>PP_TouchPoint</code>. 74 * PP_MakeTouchPoint() creates a <code>PP_TouchPoint</code>.
74 * 75 *
75 * @return A <code>PP_TouchPoint</code> structure. 76 * @return A <code>PP_TouchPoint</code> structure.
76 */ 77 */
77 PP_INLINE struct PP_TouchPoint PP_MakeTouchPoint() { 78 PP_INLINE struct PP_TouchPoint PP_MakeTouchPoint() {
78 struct PP_TouchPoint result = { 0, {0, 0}, {0, 0}, 0, 0 }; 79 struct PP_TouchPoint result = { 0, {0, 0}, {0, 0}, 0, 0 };
79 return result; 80 return result;
80 } 81 }
81 /** 82 /**
82 * @} 83 * @}
83 */ 84 */
84 85
85 #endif /* PPAPI_C_PP_TOUCH_POINT_H_ */ 86 #endif /* PPAPI_C_PP_TOUCH_POINT_H_ */
86 87
OLDNEW
« no previous file with comments | « ppapi/api/pp_touch_point.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698