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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, PassRefPtrWillBeRawPtr<Clipboard>
, bool isSimulated); | 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 virtual void trace(Visitor*) OVERRIDE; |
| 106 |
105 private: | 107 private: |
106 unsigned short m_button; | 108 unsigned short m_button; |
107 bool m_buttonDown; | 109 bool m_buttonDown; |
108 RefPtr<EventTarget> m_relatedTarget; | 110 RefPtr<EventTarget> m_relatedTarget; |
109 RefPtrWillBePersistent<Clipboard> m_clipboard; | 111 RefPtrWillBeMember<Clipboard> m_clipboard; |
110 }; | 112 }; |
111 | 113 |
112 class SimulatedMouseEvent FINAL : public MouseEvent { | 114 class SimulatedMouseEvent FINAL : public MouseEvent { |
113 public: | 115 public: |
114 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); |
115 virtual ~SimulatedMouseEvent(); | 117 virtual ~SimulatedMouseEvent(); |
116 | 118 |
| 119 virtual void trace(Visitor*) OVERRIDE; |
| 120 |
117 private: | 121 private: |
118 SimulatedMouseEvent(const AtomicString& eventType, PassRefPtr<AbstractView>,
PassRefPtr<Event> underlyingEvent); | 122 SimulatedMouseEvent(const AtomicString& eventType, PassRefPtr<AbstractView>,
PassRefPtr<Event> underlyingEvent); |
119 }; | 123 }; |
120 | 124 |
121 class MouseEventDispatchMediator FINAL : public EventDispatchMediator { | 125 class MouseEventDispatchMediator FINAL : public EventDispatchMediator { |
122 public: | 126 public: |
123 enum MouseEventType { SyntheticMouseEvent, NonSyntheticMouseEvent}; | 127 enum MouseEventType { SyntheticMouseEvent, NonSyntheticMouseEvent}; |
124 static PassRefPtr<MouseEventDispatchMediator> create(PassRefPtr<MouseEvent>,
MouseEventType = NonSyntheticMouseEvent); | 128 static PassRefPtr<MouseEventDispatchMediator> create(PassRefPtr<MouseEvent>,
MouseEventType = NonSyntheticMouseEvent); |
125 | 129 |
126 private: | 130 private: |
127 explicit MouseEventDispatchMediator(PassRefPtr<MouseEvent>, MouseEventType); | 131 explicit MouseEventDispatchMediator(PassRefPtr<MouseEvent>, MouseEventType); |
128 MouseEvent* event() const; | 132 MouseEvent* event() const; |
129 | 133 |
130 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 134 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
131 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou
seEvent; } | 135 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou
seEvent; } |
132 MouseEventType m_mouseEventType; | 136 MouseEventType m_mouseEventType; |
133 }; | 137 }; |
134 | 138 |
135 DEFINE_EVENT_TYPE_CASTS(MouseEvent); | 139 DEFINE_EVENT_TYPE_CASTS(MouseEvent); |
136 | 140 |
137 } // namespace WebCore | 141 } // namespace WebCore |
138 | 142 |
139 #endif // MouseEvent_h | 143 #endif // MouseEvent_h |
OLD | NEW |