| Index: ui/events/gesture_detection/motion_event.h
|
| diff --git a/ui/events/gesture_detection/motion_event.h b/ui/events/gesture_detection/motion_event.h
|
| index 899aeea1c2ae7b8530cfbb1af15e57824bb2b29d..a1ed7ebad6ab47d71e9e567eb3005bcacd75df7f 100644
|
| --- a/ui/events/gesture_detection/motion_event.h
|
| +++ b/ui/events/gesture_detection/motion_event.h
|
| @@ -16,7 +16,7 @@ namespace ui {
|
| class GESTURE_DETECTION_EXPORT MotionEvent {
|
| public:
|
| enum Action {
|
| - ACTION_DOWN,
|
| + ACTION_DOWN = 100,
|
| ACTION_UP,
|
| ACTION_MOVE,
|
| ACTION_CANCEL,
|
| @@ -24,6 +24,20 @@ class GESTURE_DETECTION_EXPORT MotionEvent {
|
| ACTION_POINTER_UP,
|
| };
|
|
|
| + enum ToolType {
|
| + TOOL_TYPE_UNKNOWN = 200,
|
| + TOOL_TYPE_FINGER,
|
| + TOOL_TYPE_STYLUS,
|
| + TOOL_TYPE_MOUSE,
|
| + };
|
| +
|
| + const static int BUTTON_NONE = 0;
|
| + const static int BUTTON_PRIMARY = 1;
|
| + const static int BUTTON_SECONDARY = 2;
|
| + const static int BUTTON_TERTIARY = 4;
|
| + const static int BUTTON_BACK = 8;
|
| + const static int BUTTON_FORWARD = 16;
|
| +
|
| // The implementer promises that |GetPointerId()| will never exceed this.
|
| enum { MAX_POINTER_ID = 31 };
|
|
|
| @@ -53,6 +67,8 @@ class GESTURE_DETECTION_EXPORT MotionEvent {
|
| size_t historical_index) const = 0;
|
| virtual float GetHistoricalY(size_t pointer_index,
|
| size_t historical_index) const = 0;
|
| + virtual ToolType GetToolType(size_t pointer_index) const = 0;
|
| + virtual int GetButtonState() const = 0;
|
|
|
| virtual scoped_ptr<MotionEvent> Clone() const = 0;
|
| virtual scoped_ptr<MotionEvent> Cancel() const = 0;
|
|
|