| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
| 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 #ifndef UIEvent_h | 24 #ifndef UIEvent_h |
| 25 #define UIEvent_h | 25 #define UIEvent_h |
| 26 | 26 |
| 27 #include "core/CoreExport.h" | 27 #include "core/CoreExport.h" |
| 28 #include "core/events/Event.h" | 28 #include "core/events/Event.h" |
| 29 #include "core/events/EventDispatchMediator.h" | 29 #include "core/events/EventDispatchMediator.h" |
| 30 #include "core/events/UIEventInit.h" | 30 #include "core/events/UIEventInit.h" |
| 31 #include "core/frame/DOMWindow.h" | 31 #include "core/frame/DOMWindow.h" |
| 32 #include "core/input/InputDeviceCapabilities.h" |
| 32 | 33 |
| 33 namespace blink { | 34 namespace blink { |
| 34 | 35 |
| 35 class InputDeviceCapabilities; | |
| 36 | |
| 37 // FIXME: Get rid of this type alias. | 36 // FIXME: Get rid of this type alias. |
| 38 using AbstractView = DOMWindow; | 37 using AbstractView = DOMWindow; |
| 39 | 38 |
| 40 class CORE_EXPORT UIEvent : public Event { | 39 class CORE_EXPORT UIEvent : public Event { |
| 41 DEFINE_WRAPPERTYPEINFO(); | 40 DEFINE_WRAPPERTYPEINFO(); |
| 42 | 41 |
| 43 public: | 42 public: |
| 44 static UIEvent* create() { return new UIEvent; } | 43 static UIEvent* create() { return new UIEvent; } |
| 45 static UIEvent* create(const AtomicString& type, | 44 static UIEvent* create(const AtomicString& type, |
| 46 const UIEventInit& initializer) { | 45 const UIEventInit& initializer) { |
| 47 return new UIEvent(type, initializer); | 46 return new UIEvent(type, initializer); |
| 48 } | 47 } |
| 49 ~UIEvent() override; | 48 ~UIEvent() override; |
| 50 | 49 |
| 51 void initUIEvent(const AtomicString& type, | 50 void initUIEvent(const AtomicString& type, |
| 52 bool canBubble, | 51 bool canBubble, |
| 53 bool cancelable, | 52 bool cancelable, |
| 54 AbstractView*, | 53 AbstractView*, |
| 55 int detail); | 54 int detail); |
| 56 void initUIEventInternal(const AtomicString& type, | 55 void initUIEventInternal( |
| 57 bool canBubble, | 56 const AtomicString& type, |
| 58 bool cancelable, | 57 bool canBubble, |
| 59 EventTarget* relatedTarget, | 58 bool cancelable, |
| 60 AbstractView*, | 59 EventTarget* relatedTarget, |
| 61 int detail, | 60 AbstractView*, |
| 62 InputDeviceCapabilities* sourceCapabilities); | 61 int detail, |
| 62 const InputDeviceCapabilitiesValue& sourceCapabilities); |
| 63 | 63 |
| 64 AbstractView* view() const { return m_view.get(); } | 64 AbstractView* view() const { return m_view.get(); } |
| 65 int detail() const { return m_detail; } | 65 int detail() const { return m_detail; } |
| 66 InputDeviceCapabilities* sourceCapabilities() const { | 66 InputDeviceCapabilities* sourceCapabilities(); |
| 67 return m_sourceCapabilities.get(); | |
| 68 } | |
| 69 | 67 |
| 70 const AtomicString& interfaceName() const override; | 68 const AtomicString& interfaceName() const override; |
| 71 bool isUIEvent() const final; | 69 bool isUIEvent() const final; |
| 72 | 70 |
| 73 virtual int which() const; | 71 virtual int which() const; |
| 74 | 72 |
| 75 DECLARE_VIRTUAL_TRACE(); | 73 DECLARE_VIRTUAL_TRACE(); |
| 76 | 74 |
| 77 protected: | 75 protected: |
| 78 UIEvent(); | 76 UIEvent(); |
| 79 UIEvent(const AtomicString& type, | 77 UIEvent(const AtomicString& type, |
| 80 bool canBubble, | 78 bool canBubble, |
| 81 bool cancelable, | 79 bool cancelable, |
| 82 ComposedMode, | 80 ComposedMode, |
| 83 TimeTicks platformTimeStamp, | 81 TimeTicks platformTimeStamp, |
| 84 AbstractView*, | 82 AbstractView*, |
| 85 int detail, | 83 int detail, |
| 86 InputDeviceCapabilities* sourceCapabilities); | 84 const InputDeviceCapabilitiesValue& sourceCapabilities); |
| 87 UIEvent(const AtomicString&, const UIEventInit&); | 85 UIEvent(const AtomicString&, const UIEventInit&); |
| 88 | 86 |
| 87 const InputDeviceCapabilitiesValue& sourceCapabilitiesValue() const { |
| 88 return m_sourceCapabilities; |
| 89 } |
| 90 |
| 89 private: | 91 private: |
| 90 Member<AbstractView> m_view; | 92 Member<AbstractView> m_view; |
| 91 int m_detail; | 93 int m_detail; |
| 92 Member<InputDeviceCapabilities> m_sourceCapabilities; | 94 InputDeviceCapabilitiesValue m_sourceCapabilities; |
| 93 }; | 95 }; |
| 94 | 96 |
| 95 } // namespace blink | 97 } // namespace blink |
| 96 | 98 |
| 97 #endif // UIEvent_h | 99 #endif // UIEvent_h |
| OLD | NEW |