OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
8 * | 8 * |
9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 virtual void uncaughtExceptionInEventHandler(); | 116 virtual void uncaughtExceptionInEventHandler(); |
117 | 117 |
118 // Used for legacy "onEvent" attribute APIs. | 118 // Used for legacy "onEvent" attribute APIs. |
119 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<Eve
ntListener>, DOMWrapperWorld* isolatedWorld = 0); | 119 bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<Eve
ntListener>, DOMWrapperWorld* isolatedWorld = 0); |
120 EventListener* getAttributeEventListener(const AtomicString& eventType, DOMW
rapperWorld* isolatedWorld = 0); | 120 EventListener* getAttributeEventListener(const AtomicString& eventType, DOMW
rapperWorld* isolatedWorld = 0); |
121 | 121 |
122 bool hasEventListeners() const; | 122 bool hasEventListeners() const; |
123 bool hasEventListeners(const AtomicString& eventType) const; | 123 bool hasEventListeners(const AtomicString& eventType) const; |
124 bool hasCapturingEventListeners(const AtomicString& eventType); | 124 bool hasCapturingEventListeners(const AtomicString& eventType); |
125 const EventListenerVector& getEventListeners(const AtomicString& eventType); | 125 const EventListenerVector& getEventListeners(const AtomicString& eventType); |
| 126 Vector<AtomicString> eventTypes(); |
126 | 127 |
127 bool fireEventListeners(Event*); | 128 bool fireEventListeners(Event*); |
128 bool isFiringEventListeners(); | 129 bool isFiringEventListeners(); |
129 | 130 |
130 protected: | 131 protected: |
131 virtual ~EventTarget(); | 132 virtual ~EventTarget(); |
132 | 133 |
133 // Subclasses should likely not override these themselves; instead, they sho
uld subclass EventTargetWithInlineData. | 134 // Subclasses should likely not override these themselves; instead, they sho
uld subclass EventTargetWithInlineData. |
134 virtual EventTargetData* eventTargetData() = 0; | 135 virtual EventTargetData* eventTargetData() = 0; |
135 virtual EventTargetData& ensureEventTargetData() = 0; | 136 virtual EventTargetData& ensureEventTargetData() = 0; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 virtual void refEventTarget() OVERRIDE FINAL { ref(); } \ | 245 virtual void refEventTarget() OVERRIDE FINAL { ref(); } \ |
245 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } \ | 246 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } \ |
246 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro | 247 typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro |
247 | 248 |
248 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou
nted. | 249 // Use this macro if your EventTarget subclass is also a subclass of WTF::RefCou
nted. |
249 // A ref-counted class that uses a different method of refcounting should use DE
FINE_EVENT_TARGET_REFCOUNTING directly. | 250 // A ref-counted class that uses a different method of refcounting should use DE
FINE_EVENT_TARGET_REFCOUNTING directly. |
250 // Both of these macros are meant to be placed just before the "public:" section
of the class declaration. | 251 // Both of these macros are meant to be placed just before the "public:" section
of the class declaration. |
251 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo
unted<className>) | 252 #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCo
unted<className>) |
252 | 253 |
253 #endif // EventTarget_h | 254 #endif // EventTarget_h |
OLD | NEW |