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

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

Issue 2193153002: MacViews: Send Mac scrollWheel NSEvents as ui::ET_SCROLL (ui::ScrollEvent). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollLayers
Patch Set: NSDictionary subscripting Created 4 years, 2 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_unittest.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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 // Scale the scroll event's offset value. 967 // Scale the scroll event's offset value.
968 // This is useful in the multi-monitor setup where it needs to be scaled 968 // This is useful in the multi-monitor setup where it needs to be scaled
969 // to provide a consistent user experience. 969 // to provide a consistent user experience.
970 void Scale(const float factor); 970 void Scale(const float factor);
971 971
972 float x_offset() const { return x_offset_; } 972 float x_offset() const { return x_offset_; }
973 float y_offset() const { return y_offset_; } 973 float y_offset() const { return y_offset_; }
974 float x_offset_ordinal() const { return x_offset_ordinal_; } 974 float x_offset_ordinal() const { return x_offset_ordinal_; }
975 float y_offset_ordinal() const { return y_offset_ordinal_; } 975 float y_offset_ordinal() const { return y_offset_ordinal_; }
976 int finger_count() const { return finger_count_; } 976 int finger_count() const { return finger_count_; }
977 EventMomentumPhase momentum_phase() const { return momentum_phase_; }
977 978
978 private: 979 private:
979 // Potential accelerated offsets. 980 // Potential accelerated offsets.
980 float x_offset_; 981 float x_offset_;
981 float y_offset_; 982 float y_offset_;
982 // Unaccelerated offsets. 983 // Unaccelerated offsets.
983 float x_offset_ordinal_; 984 float x_offset_ordinal_;
984 float y_offset_ordinal_; 985 float y_offset_ordinal_;
985 // Number of fingers on the pad. 986 // Number of fingers on the pad.
986 int finger_count_; 987 int finger_count_;
988
989 // For non-fling events, provides momentum information (e.g. for the case
990 // where the device provides continuous event updates during a fling).
991 EventMomentumPhase momentum_phase_;
987 }; 992 };
988 993
989 class EVENTS_EXPORT GestureEvent : public LocatedEvent { 994 class EVENTS_EXPORT GestureEvent : public LocatedEvent {
990 public: 995 public:
991 // The constructor takes a default unique_touch_id of zero to support many 996 // The constructor takes a default unique_touch_id of zero to support many
992 // (80+) existing tests that doesn't care about this id. 997 // (80+) existing tests that doesn't care about this id.
993 GestureEvent(float x, 998 GestureEvent(float x,
994 float y, 999 float y,
995 int flags, 1000 int flags,
996 base::TimeTicks time_stamp, 1001 base::TimeTicks time_stamp,
(...skipping 24 matching lines...) Expand all
1021 // dispatched. This field gets a non-zero value only for gestures that are 1026 // dispatched. This field gets a non-zero value only for gestures that are
1022 // released through TouchDispositionGestureFilter::SendGesture. The gesture 1027 // released through TouchDispositionGestureFilter::SendGesture. The gesture
1023 // events that aren't fired directly in response to processing a touch-event 1028 // events that aren't fired directly in response to processing a touch-event
1024 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. 1029 // (e.g. timer fired ones), this id is zero. See crbug.com/618738.
1025 uint32_t unique_touch_event_id_; 1030 uint32_t unique_touch_event_id_;
1026 }; 1031 };
1027 1032
1028 } // namespace ui 1033 } // namespace ui
1029 1034
1030 #endif // UI_EVENTS_EVENT_H_ 1035 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « ui/events/cocoa/events_mac_unittest.mm ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698