| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 public: | 52 public: |
| 53 static PassRefPtr<MouseEvent> create() | 53 static PassRefPtr<MouseEvent> create() |
| 54 { | 54 { |
| 55 return adoptRef(new MouseEvent); | 55 return adoptRef(new MouseEvent); |
| 56 } | 56 } |
| 57 | 57 |
| 58 static PassRefPtr<MouseEvent> create(const AtomicString& type, bool canBubbl
e, bool cancelable, PassRefPtr<AbstractView>, | 58 static PassRefPtr<MouseEvent> create(const AtomicString& type, bool canBubbl
e, bool cancelable, PassRefPtr<AbstractView>, |
| 59 int detail, int screenX, int screenY, int pageX, int pageY, | 59 int detail, int screenX, int screenY, int pageX, int pageY, |
| 60 int movementX, int movementY, | 60 int movementX, int movementY, |
| 61 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b
utton, | 61 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b
utton, |
| 62 PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard>, bool isSim
ulated = false); | 62 PassRefPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPtr<Clipboard>
, bool isSimulated = false); |
| 63 | 63 |
| 64 static PassRefPtr<MouseEvent> create(const AtomicString& eventType, PassRefP
tr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relate
dTarget); | 64 static PassRefPtr<MouseEvent> create(const AtomicString& eventType, PassRefP
tr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relate
dTarget); |
| 65 | 65 |
| 66 static PassRefPtr<MouseEvent> create(const AtomicString& eventType, const Mo
useEventInit&); | 66 static PassRefPtr<MouseEvent> create(const AtomicString& eventType, const Mo
useEventInit&); |
| 67 | 67 |
| 68 virtual ~MouseEvent(); | 68 virtual ~MouseEvent(); |
| 69 | 69 |
| 70 void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelabl
e, PassRefPtr<AbstractView>, | 70 void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelabl
e, PassRefPtr<AbstractView>, |
| 71 int detail, int screenX, int screenY, int clientX, int clientY, | 71 int detail, int screenX, int screenY, int clientX, int clientY, |
| 72 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, | 72 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 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 protected: | 94 protected: |
| 95 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe
fPtr<AbstractView>, | 95 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe
fPtr<AbstractView>, |
| 96 int detail, int screenX, int screenY, int pageX, int pageY, | 96 int detail, int screenX, int screenY, int pageX, int pageY, |
| 97 int movementX, int movementY, | 97 int movementX, int movementY, |
| 98 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b
utton, | 98 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b
utton, |
| 99 PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard>, bool isSim
ulated); | 99 PassRefPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPtr<Clipboard>
, bool isSimulated); |
| 100 | 100 |
| 101 MouseEvent(const AtomicString& type, const MouseEventInit&); | 101 MouseEvent(const AtomicString& type, const MouseEventInit&); |
| 102 | 102 |
| 103 MouseEvent(); | 103 MouseEvent(); |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 unsigned short m_button; | 106 unsigned short m_button; |
| 107 bool m_buttonDown; | 107 bool m_buttonDown; |
| 108 RefPtr<EventTarget> m_relatedTarget; | 108 RefPtr<EventTarget> m_relatedTarget; |
| 109 RefPtr<Clipboard> m_clipboard; | 109 RefPtrWillBePersistent<Clipboard> m_clipboard; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 class SimulatedMouseEvent FINAL : public MouseEvent { | 112 class SimulatedMouseEvent FINAL : public MouseEvent { |
| 113 public: | 113 public: |
| 114 static PassRefPtr<SimulatedMouseEvent> create(const AtomicString& eventType,
PassRefPtr<AbstractView>, PassRefPtr<Event> underlyingEvent); | 114 static PassRefPtr<SimulatedMouseEvent> create(const AtomicString& eventType,
PassRefPtr<AbstractView>, PassRefPtr<Event> underlyingEvent); |
| 115 virtual ~SimulatedMouseEvent(); | 115 virtual ~SimulatedMouseEvent(); |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 SimulatedMouseEvent(const AtomicString& eventType, PassRefPtr<AbstractView>,
PassRefPtr<Event> underlyingEvent); | 118 SimulatedMouseEvent(const AtomicString& eventType, PassRefPtr<AbstractView>,
PassRefPtr<Event> underlyingEvent); |
| 119 }; | 119 }; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 130 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 130 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
| 131 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou
seEvent; } | 131 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou
seEvent; } |
| 132 MouseEventType m_mouseEventType; | 132 MouseEventType m_mouseEventType; |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 DEFINE_EVENT_TYPE_CASTS(MouseEvent); | 135 DEFINE_EVENT_TYPE_CASTS(MouseEvent); |
| 136 | 136 |
| 137 } // namespace WebCore | 137 } // namespace WebCore |
| 138 | 138 |
| 139 #endif // MouseEvent_h | 139 #endif // MouseEvent_h |
| OLD | NEW |