Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / events / gesture_detection / gesture_event_data.h
1 // Copyright 2014 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 UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_
7
8 #include "base/time/time.h"
9 #include "ui/events/event_constants.h"
10 #include "ui/events/gesture_detection/gesture_detection_export.h"
11 #include "ui/events/gesture_event_details.h"
12
13 namespace ui {
14
15 class GestureEventDataPacket;
16
17 struct GESTURE_DETECTION_EXPORT GestureEventData {
18   GestureEventData(EventType type,
19                    int motion_event_id,
20                    base::TimeTicks time,
21                    float x,
22                    float y,
23                    int touch_point_count,
24                    const gfx::RectF& bounding_box,
25                    const GestureEventDetails& details);
26
27   GestureEventData(EventType type,
28                    int motion_event_id,
29                    base::TimeTicks time,
30                    float x,
31                    float y,
32                    int touch_point_count,
33                    const gfx::RectF& bounding_box);
34
35   EventType type;
36   int motion_event_id;
37   base::TimeTicks time;
38   float x;
39   float y;
40
41   GestureEventDetails details;
42
43  private:
44   friend class GestureEventDataPacket;
45
46   // Initializes type to GESTURE_TYPE_INVALID.
47   GestureEventData();
48 };
49
50 }  //  namespace ui
51
52 #endif  // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_