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

Side by Side Diff: ppapi/api/pp_touch_point.idl

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 | « no previous file | ppapi/c/pp_touch_point.h » ('j') | 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 6
7 /** 7 /**
8 * This file defines the API to create a touch-point. 8 * This file defines the API to create a touch point or position where fingers
9 * makes contact with touch screen device.
9 */ 10 */
10 11
11 /** 12 /**
12 * The <code>PP_TouchPoint</code> represents all information about a single 13 * The <code>PP_TouchPoint</code> struct represents all information about a
13 * touch point, such ase position, id, rotation angle, and pressure. 14 * single touch point, such ase position, id, rotation angle, and pressure.
14 */ 15 */
15 [assert_size(28), returnByValue] 16 [assert_size(28), returnByValue]
16 struct PP_TouchPoint { 17 struct PP_TouchPoint {
17 /** 18 /**
18 * The identifier for this TouchPoint. This corresponds to the order 19 * This value represents the identifier for this TouchPoint. The id
19 * in which the points were pressed. For example, the first point to be 20 * corresponds to the order in which the points were pressed. For example,
20 * pressed has an id of 0, the second has an id of 1, and so on. An id can be 21 * the first point to be pressed has an id of 0, the second has an id of 1,
21 * reused when a touch point is released. For example, if two fingers are 22 * and so on. An id can be reused when a touch point is released. For
22 * down, with id 0 and 1, and finger 0 releases, the next finger to be 23 * example, if two fingers are down, with id 0 and 1, and finger 0 releases,
23 * pressed can be assigned to id 0. 24 * the next finger to be pressed can be assigned to id 0.
24 */ 25 */
25 uint32_t id; 26 uint32_t id;
26 27
27 /** 28 /**
28 * The x-y pixel position of this TouchPoint, relative to the upper-left of 29 * This value represents the x and y pixel position of this TouchPoint
29 * the instance receiving the event. 30 * relative to the upper-left of the module instance receiving the event.
30 */ 31 */
31 PP_FloatPoint position; 32 PP_FloatPoint position;
32 33
33 /** 34 /**
34 * The elliptical radii, in screen pixels, in the x and y direction of this 35 * This value represents the elliptical radii, in screen pixels, in the x
35 * TouchPoint. 36 * and y direction of this TouchPoint.
36 */ 37 */
37 PP_FloatPoint radius; 38 PP_FloatPoint radius;
38 39
39 /** 40 /**
40 * The angle of rotation in degrees of the elliptical model of this TouchPoint 41 * This value represents the angle of rotation in degrees of the elliptical
41 * clockwise from "up." 42 * model of this TouchPoint clockwise from "up."
42 */ 43 */
43 float_t rotation_angle; 44 float_t rotation_angle;
44 45
45 /** 46 /**
46 * The pressure applied to this TouchPoint. This is typically a 47 * This value represents the pressure applied to this TouchPoint. This value
47 * value between 0 and 1, with 0 indicating no pressure and 1 indicating 48 * is typically between 0 and 1, with 0 indicating no pressure and 1
48 * some maximum pressure, but scaling differs depending on the hardware and 49 * indicating some maximum pressure. Scaling differs depending on the
49 * the value is not guaranteed to stay within that range. 50 * hardware and the value is not guaranteed to stay within that range.
50 */ 51 */
51 float_t pressure; 52 float_t pressure;
52 }; 53 };
53 54
54 #inline c 55 #inline c
55 /** 56 /**
56 * @addtogroup Functions 57 * @addtogroup Functions
57 * @{ 58 * @{
58 */ 59 */
59 60
60 /** 61 /**
61 * PP_MakeTouchPoint() creates a <code>PP_TouchPoint</code>. 62 * PP_MakeTouchPoint() creates a <code>PP_TouchPoint</code>.
62 * 63 *
63 * @return A <code>PP_TouchPoint</code> structure. 64 * @return A <code>PP_TouchPoint</code> structure.
64 */ 65 */
65 PP_INLINE struct PP_TouchPoint PP_MakeTouchPoint() { 66 PP_INLINE struct PP_TouchPoint PP_MakeTouchPoint() {
66 struct PP_TouchPoint result = { 0, {0, 0}, {0, 0}, 0, 0 }; 67 struct PP_TouchPoint result = { 0, {0, 0}, {0, 0}, 0, 0 };
67 return result; 68 return result;
68 } 69 }
69 /** 70 /**
70 * @} 71 * @}
71 */ 72 */
72 73
73 #endinl 74 #endinl
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/pp_touch_point.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698