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