Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
 All Classes Namespaces Files Functions Typedefs Enumerations Macros Groups
touch_point.h
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 
5 #ifndef PPAPI_CPP_TOUCH_POINT_H_
6 #define PPAPI_CPP_TOUCH_POINT_H_
7 
8 #include <stdint.h>
9 
10 #include "ppapi/c/ppb_input_event.h"
11 #include "ppapi/cpp/input_event.h"
12 #include "ppapi/cpp/point.h"
13 
14 namespace pp {
15 
17 class TouchPoint {
18  public:
19  TouchPoint() : touch_point_(PP_MakeTouchPoint()) {}
20 
21  TouchPoint(const PP_TouchPoint& point) : touch_point_(point) {}
22 
29  uint32_t id() const { return touch_point_.id; }
30 
32  FloatPoint position() const {
33  return pp::FloatPoint(touch_point_.position);
34  }
35 
38  FloatPoint radii() const { return pp::FloatPoint(touch_point_.radius); }
39 
42  float rotation_angle() const { return touch_point_.rotation_angle; }
43 
48  float pressure() const { return touch_point_.pressure; }
49 
50  private:
51  PP_TouchPoint touch_point_;
52 };
53 
54 } // namespace pp
55 
56 #endif /* PPAPI_CPP_TOUCH_POINT_H_ */
FloatPoint position() const
Definition: touch_point.h:32
FloatPoint radii() const
Definition: touch_point.h:38
float rotation_angle() const
Definition: touch_point.h:42
Definition: point.h:157
Wrapper class for PP_TouchPoint.
Definition: touch_point.h:17
uint32_t id() const
Definition: touch_point.h:29
float pressure() const
Definition: touch_point.h:48