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