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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 Node* fromElement() const; | 84 Node* fromElement() const; |
85 | 85 |
86 Clipboard* dataTransfer() const { return isDragEvent() ? m_clipboard.get() :
0; } | 86 Clipboard* dataTransfer() const { return isDragEvent() ? m_clipboard.get() :
0; } |
87 | 87 |
88 virtual const AtomicString& interfaceName() const OVERRIDE; | 88 virtual const AtomicString& interfaceName() const OVERRIDE; |
89 | 89 |
90 virtual bool isMouseEvent() const OVERRIDE; | 90 virtual bool isMouseEvent() const OVERRIDE; |
91 virtual bool isDragEvent() const OVERRIDE FINAL; | 91 virtual bool isDragEvent() const OVERRIDE FINAL; |
92 virtual int which() const OVERRIDE FINAL; | 92 virtual int which() const OVERRIDE FINAL; |
93 | 93 |
| 94 virtual void trace(Visitor*) OVERRIDE; |
| 95 |
94 protected: | 96 protected: |
95 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe
fPtr<AbstractView>, | 97 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe
fPtr<AbstractView>, |
96 int detail, int screenX, int screenY, int pageX, int pageY, | 98 int detail, int screenX, int screenY, int pageX, int pageY, |
97 int movementX, int movementY, | 99 int movementX, int movementY, |
98 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b
utton, | 100 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b
utton, |
99 PassRefPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPtr<Clipboard>
, bool isSimulated); | 101 PassRefPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPtr<Clipboard>
, bool isSimulated); |
100 | 102 |
101 MouseEvent(const AtomicString& type, const MouseEventInit&); | 103 MouseEvent(const AtomicString& type, const MouseEventInit&); |
102 | 104 |
103 MouseEvent(); | 105 MouseEvent(); |
104 | 106 |
105 virtual void trace(Visitor*) OVERRIDE; | |
106 | |
107 private: | 107 private: |
108 unsigned short m_button; | 108 unsigned short m_button; |
109 bool m_buttonDown; | 109 bool m_buttonDown; |
110 RefPtr<EventTarget> m_relatedTarget; | 110 RefPtr<EventTarget> m_relatedTarget; |
111 RefPtrWillBeMember<Clipboard> m_clipboard; | 111 RefPtrWillBeMember<Clipboard> m_clipboard; |
112 }; | 112 }; |
113 | 113 |
114 class SimulatedMouseEvent FINAL : public MouseEvent { | 114 class SimulatedMouseEvent FINAL : public MouseEvent { |
115 public: | 115 public: |
116 static PassRefPtr<SimulatedMouseEvent> create(const AtomicString& eventType,
PassRefPtr<AbstractView>, PassRefPtr<Event> underlyingEvent); | 116 static PassRefPtr<SimulatedMouseEvent> create(const AtomicString& eventType,
PassRefPtr<AbstractView>, PassRefPtr<Event> underlyingEvent); |
(...skipping 17 matching lines...) Expand all Loading... |
134 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 134 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
135 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou
seEvent; } | 135 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou
seEvent; } |
136 MouseEventType m_mouseEventType; | 136 MouseEventType m_mouseEventType; |
137 }; | 137 }; |
138 | 138 |
139 DEFINE_EVENT_TYPE_CASTS(MouseEvent); | 139 DEFINE_EVENT_TYPE_CASTS(MouseEvent); |
140 | 140 |
141 } // namespace WebCore | 141 } // namespace WebCore |
142 | 142 |
143 #endif // MouseEvent_h | 143 #endif // MouseEvent_h |
OLD | NEW |