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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelabl
e, PassRefPtr<AbstractView>, | 76 void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelabl
e, PassRefPtr<AbstractView>, |
77 int detail, int screenX, int screenY, int clientX, int clientY, | 77 int detail, int screenX, int screenY, int clientX, int clientY, |
78 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, | 78 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, |
79 unsigned short button, PassRefPtr<EventTarget> relatedTarget); | 79 unsigned short button, PassRefPtr<EventTarget> relatedTarget); |
80 | 80 |
81 // WinIE uses 1,4,2 for left/middle/right but not for click (just for moused
own/up, maybe others), | 81 // WinIE uses 1,4,2 for left/middle/right but not for click (just for moused
own/up, maybe others), |
82 // but we will match the standard DOM. | 82 // but we will match the standard DOM. |
83 unsigned short button() const { return m_button; } | 83 unsigned short button() const { return m_button; } |
84 bool buttonDown() const { return m_buttonDown; } | 84 bool buttonDown() const { return m_buttonDown; } |
85 EventTarget* relatedTarget() const { return m_relatedTarget.get(); } | 85 EventTarget* relatedTarget() const { return m_relatedTarget.get(); } |
| 86 EventTarget* relatedTarget(bool& isNull) const { isNull = !m_relatedTarget;
return m_relatedTarget.get(); } |
86 void setRelatedTarget(PassRefPtr<EventTarget> relatedTarget) { m_relatedTarg
et = relatedTarget; } | 87 void setRelatedTarget(PassRefPtr<EventTarget> relatedTarget) { m_relatedTarg
et = relatedTarget; } |
87 | 88 |
88 Clipboard* clipboard() const { return m_clipboard.get(); } | 89 Clipboard* clipboard() const { return m_clipboard.get(); } |
89 | 90 |
90 Node* toElement() const; | 91 Node* toElement() const; |
91 Node* fromElement() const; | 92 Node* fromElement() const; |
92 | 93 |
93 Clipboard* dataTransfer() const { return isDragEvent() ? m_clipboard.get() :
0; } | 94 Clipboard* dataTransfer() const { return isDragEvent() ? m_clipboard.get() :
0; } |
94 | 95 |
95 virtual const AtomicString& interfaceName() const; | 96 virtual const AtomicString& interfaceName() const; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 138 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
138 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou
seEvent; } | 139 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou
seEvent; } |
139 MouseEventType m_mouseEventType; | 140 MouseEventType m_mouseEventType; |
140 }; | 141 }; |
141 | 142 |
142 DEFINE_EVENT_TYPE_CASTS(MouseEvent); | 143 DEFINE_EVENT_TYPE_CASTS(MouseEvent); |
143 | 144 |
144 } // namespace WebCore | 145 } // namespace WebCore |
145 | 146 |
146 #endif // MouseEvent_h | 147 #endif // MouseEvent_h |
OLD | NEW |