|
1 /* |
|
2 * Copyright (C) 2005, 2007 Apple Inc. All rights reserved. |
|
3 * Copyright (C) 2006 Jon Shier (jshier@iastate.edu) |
|
4 * |
|
5 * This library is free software; you can redistribute it and/or |
|
6 * modify it under the terms of the GNU Library General Public |
|
7 * License as published by the Free Software Foundation; either |
|
8 * version 2 of the License, or (at your option) any later version. |
|
9 * |
|
10 * This library is distributed in the hope that it will be useful, |
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 * Library General Public License for more details. |
|
14 * |
|
15 * You should have received a copy of the GNU Library General Public License |
|
16 * along with this library; see the file COPYING.LIB. If not, write to |
|
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
18 * Boston, MA 02110-1301, USA. |
|
19 * |
|
20 */ |
|
21 |
|
22 #ifndef EventNames_h |
|
23 #define EventNames_h |
|
24 |
|
25 #include "AtomicString.h" |
|
26 #include "ThreadGlobalData.h" |
|
27 |
|
28 namespace WebCore { |
|
29 |
|
30 #define DOM_EVENT_NAMES_FOR_EACH(macro) \ |
|
31 \ |
|
32 macro(abort) \ |
|
33 macro(beforecopy) \ |
|
34 macro(beforecut) \ |
|
35 macro(beforeload) \ |
|
36 macro(beforepaste) \ |
|
37 macro(beforeprocess) \ |
|
38 macro(beforeunload) \ |
|
39 macro(blur) \ |
|
40 macro(cached) \ |
|
41 macro(change) \ |
|
42 macro(checking) \ |
|
43 macro(click) \ |
|
44 macro(close) \ |
|
45 macro(compositionend) \ |
|
46 macro(compositionstart) \ |
|
47 macro(compositionupdate) \ |
|
48 macro(connect) \ |
|
49 macro(contextmenu) \ |
|
50 macro(copy) \ |
|
51 macro(cut) \ |
|
52 macro(dblclick) \ |
|
53 macro(deviceorientation) \ |
|
54 macro(display) \ |
|
55 macro(downloading) \ |
|
56 macro(drag) \ |
|
57 macro(dragend) \ |
|
58 macro(dragenter) \ |
|
59 macro(dragleave) \ |
|
60 macro(dragover) \ |
|
61 macro(dragstart) \ |
|
62 macro(drop) \ |
|
63 macro(error) \ |
|
64 macro(focus) \ |
|
65 macro(focusin) \ |
|
66 macro(focusout) \ |
|
67 macro(hashchange) \ |
|
68 macro(input) \ |
|
69 macro(invalid) \ |
|
70 macro(keydown) \ |
|
71 macro(keypress) \ |
|
72 macro(keyup) \ |
|
73 macro(load) \ |
|
74 macro(loadstart) \ |
|
75 macro(message) \ |
|
76 macro(mousedown) \ |
|
77 macro(mousemove) \ |
|
78 macro(mouseout) \ |
|
79 macro(mouseover) \ |
|
80 macro(mouseup) \ |
|
81 macro(mousewheel) \ |
|
82 macro(noupdate) \ |
|
83 macro(obsolete) \ |
|
84 macro(offline) \ |
|
85 macro(online) \ |
|
86 macro(open) \ |
|
87 macro(overflowchanged) \ |
|
88 macro(pagehide) \ |
|
89 macro(pageshow) \ |
|
90 macro(paste) \ |
|
91 macro(popstate) \ |
|
92 macro(readystatechange) \ |
|
93 macro(reset) \ |
|
94 macro(resize) \ |
|
95 macro(scroll) \ |
|
96 macro(search) \ |
|
97 macro(select) \ |
|
98 macro(selectstart) \ |
|
99 macro(storage) \ |
|
100 macro(submit) \ |
|
101 macro(textInput) \ |
|
102 macro(unload) \ |
|
103 macro(updateready) \ |
|
104 macro(zoom) \ |
|
105 \ |
|
106 macro(DOMActivate) \ |
|
107 macro(DOMFocusIn) \ |
|
108 macro(DOMFocusOut) \ |
|
109 macro(DOMAttrModified) \ |
|
110 macro(DOMCharacterDataModified) \ |
|
111 macro(DOMNodeInserted) \ |
|
112 macro(DOMNodeInsertedIntoDocument) \ |
|
113 macro(DOMNodeRemoved) \ |
|
114 macro(DOMNodeRemovedFromDocument) \ |
|
115 macro(DOMSubtreeModified) \ |
|
116 macro(DOMContentLoaded) \ |
|
117 \ |
|
118 macro(webkitBeforeTextInserted) \ |
|
119 macro(webkitEditableContentChanged) \ |
|
120 \ |
|
121 macro(canplay) \ |
|
122 macro(canplaythrough) \ |
|
123 macro(durationchange) \ |
|
124 macro(emptied) \ |
|
125 macro(ended) \ |
|
126 macro(loadeddata) \ |
|
127 macro(loadedmetadata) \ |
|
128 macro(pause) \ |
|
129 macro(play) \ |
|
130 macro(playing) \ |
|
131 macro(ratechange) \ |
|
132 macro(seeked) \ |
|
133 macro(seeking) \ |
|
134 macro(timeupdate) \ |
|
135 macro(volumechange) \ |
|
136 macro(waiting) \ |
|
137 \ |
|
138 macro(webkitbeginfullscreen) \ |
|
139 macro(webkitendfullscreen) \ |
|
140 \ |
|
141 macro(progress) \ |
|
142 macro(stalled) \ |
|
143 macro(suspend) \ |
|
144 \ |
|
145 macro(webkitAnimationEnd) \ |
|
146 macro(webkitAnimationStart) \ |
|
147 macro(webkitAnimationIteration) \ |
|
148 \ |
|
149 macro(webkitTransitionEnd) \ |
|
150 \ |
|
151 macro(orientationchange) \ |
|
152 \ |
|
153 macro(touchstart) \ |
|
154 macro(touchmove) \ |
|
155 macro(touchend) \ |
|
156 macro(touchcancel) \ |
|
157 \ |
|
158 macro(transformactionstart) \ |
|
159 macro(transformactionupdate) \ |
|
160 macro(transformactionend) \ |
|
161 \ |
|
162 macro(success) \ |
|
163 \ |
|
164 macro(loadend) \ |
|
165 \ |
|
166 // end of DOM_EVENT_NAMES_FOR_EACH |
|
167 |
|
168 class EventNames : public Noncopyable { |
|
169 int dummy; // Needed to make initialization macro work. |
|
170 // Private to prevent accidental call to EventNames() instead of eventNames() |
|
171 EventNames(); |
|
172 friend class ThreadGlobalData; |
|
173 |
|
174 public: |
|
175 #define DOM_EVENT_NAMES_DECLARE(name) AtomicString name##Event; |
|
176 DOM_EVENT_NAMES_FOR_EACH(DOM_EVENT_NAMES_DECLARE) |
|
177 #undef DOM_EVENT_NAMES_DECLARE |
|
178 }; |
|
179 |
|
180 inline EventNames& eventNames() |
|
181 { |
|
182 return threadGlobalData().eventNames(); |
|
183 } |
|
184 |
|
185 } |
|
186 |
|
187 #endif |