Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: ui/events/event.h

Issue 1680613002: Adding momentum/overscroll to views:: ScrollViews Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tableview layout. aaaand I think we are done Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/events/cocoa/events_mac.mm ('k') | ui/events/event.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_EVENT_H_ 5 #ifndef UI_EVENTS_EVENT_H_
6 #define UI_EVENTS_EVENT_H_ 6 #define UI_EVENTS_EVENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 // Scale the scroll event's offset value. 977 // Scale the scroll event's offset value.
978 // This is useful in the multi-monitor setup where it needs to be scaled 978 // This is useful in the multi-monitor setup where it needs to be scaled
979 // to provide a consistent user experience. 979 // to provide a consistent user experience.
980 void Scale(const float factor); 980 void Scale(const float factor);
981 981
982 float x_offset() const { return x_offset_; } 982 float x_offset() const { return x_offset_; }
983 float y_offset() const { return y_offset_; } 983 float y_offset() const { return y_offset_; }
984 float x_offset_ordinal() const { return x_offset_ordinal_; } 984 float x_offset_ordinal() const { return x_offset_ordinal_; }
985 float y_offset_ordinal() const { return y_offset_ordinal_; } 985 float y_offset_ordinal() const { return y_offset_ordinal_; }
986 int finger_count() const { return finger_count_; } 986 int finger_count() const { return finger_count_; }
987 int momentum_phase() const { return momentum_phase_; }
987 988
988 private: 989 private:
989 // Potential accelerated offsets. 990 // Potential accelerated offsets.
990 float x_offset_; 991 float x_offset_;
991 float y_offset_; 992 float y_offset_;
992 // Unaccelerated offsets. 993 // Unaccelerated offsets.
993 float x_offset_ordinal_; 994 float x_offset_ordinal_;
994 float y_offset_ordinal_; 995 float y_offset_ordinal_;
995 // Number of fingers on the pad. 996 // Number of fingers on the pad.
996 int finger_count_; 997 int finger_count_;
998
999 // For non-fling events, provides momentum information (e.g. for the case
1000 // where the device provides continuous event updates during a fling).
1001 // Bitwise combination of EventMomentumPhase.
1002 int momentum_phase_;
997 }; 1003 };
998 1004
999 class EVENTS_EXPORT GestureEvent : public LocatedEvent { 1005 class EVENTS_EXPORT GestureEvent : public LocatedEvent {
1000 public: 1006 public:
1001 // The constructor takes a default unique_touch_id of zero to support many 1007 // The constructor takes a default unique_touch_id of zero to support many
1002 // (80+) existing tests that doesn't care about this id. 1008 // (80+) existing tests that doesn't care about this id.
1003 GestureEvent(float x, 1009 GestureEvent(float x,
1004 float y, 1010 float y,
1005 int flags, 1011 int flags,
1006 base::TimeTicks time_stamp, 1012 base::TimeTicks time_stamp,
(...skipping 24 matching lines...) Expand all
1031 // dispatched. This field gets a non-zero value only for gestures that are 1037 // dispatched. This field gets a non-zero value only for gestures that are
1032 // released through TouchDispositionGestureFilter::SendGesture. The gesture 1038 // released through TouchDispositionGestureFilter::SendGesture. The gesture
1033 // events that aren't fired directly in response to processing a touch-event 1039 // events that aren't fired directly in response to processing a touch-event
1034 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. 1040 // (e.g. timer fired ones), this id is zero. See crbug.com/618738.
1035 uint32_t unique_touch_event_id_; 1041 uint32_t unique_touch_event_id_;
1036 }; 1042 };
1037 1043
1038 } // namespace ui 1044 } // namespace ui
1039 1045
1040 #endif // UI_EVENTS_EVENT_H_ 1046 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « ui/events/cocoa/events_mac.mm ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698