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

Side by Side Diff: sky/engine/core/events/WheelEvent.h

Issue 876853005: Add wheel support to sky-scrollable (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add missing files Created 5 years, 11 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 | « sky/engine/core/core.gni ('k') | sky/engine/core/events/WheelEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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 SKY_ENGINE_CORE_EVENTS_WHEELEVENT_H_
6 #define SKY_ENGINE_CORE_EVENTS_WHEELEVENT_H_
7
8 #include "sky/engine/core/events/Event.h"
9 #include "sky/engine/public/platform/WebInputEvent.h"
10
11 namespace blink {
12
13 struct WheelEventInit : public EventInit {
14 double x = 0;
15 double y = 0;
16 double offsetX = 0;
17 double offsetY = 0;
18 };
19
20 class WheelEvent : public Event {
21 DEFINE_WRAPPERTYPEINFO();
22 public:
23 static PassRefPtr<WheelEvent> create()
24 {
25 return adoptRef(new WheelEvent);
26 }
27 static PassRefPtr<WheelEvent> create(const WebWheelEvent& event)
28 {
29 return adoptRef(new WheelEvent(event));
30 }
31 static PassRefPtr<WheelEvent> create(const AtomicString& type, const WheelEv entInit& initializer)
32 {
33 return adoptRef(new WheelEvent(type, initializer));
34 }
35
36 ~WheelEvent() override;
37 const AtomicString& interfaceName() const override;
38
39 double x() const { return m_x; }
40 double y() const { return m_y; }
41 double offsetX() const { return m_offsetX; }
42 double offsetY() const { return m_offsetY; }
43
44 private:
45 WheelEvent();
46 explicit WheelEvent(const WebWheelEvent& event);
47 WheelEvent(const AtomicString&, const WheelEventInit&);
48
49 double m_x;
50 double m_y;
51 double m_offsetX;
52 double m_offsetY;
53 };
54
55 } // namespace blink
56
57 #endif // SKY_ENGINE_CORE_EVENTS_WHEELEVENT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/events/WheelEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698