OSDN Git Service

Merge WebKit at r75315: Initial merge by git.
[android-x86/external-webkit.git] / Source / WebCore / dom / EventNames.h
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 "ThreadGlobalData.h"
26 #include <wtf/text/AtomicString.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(complete) \
46     macro(compositionend) \
47     macro(compositionstart) \
48     macro(compositionupdate) \
49     macro(connect) \
50     macro(contextmenu) \
51     macro(copy) \
52     macro(cut) \
53     macro(dblclick) \
54     macro(devicemotion) \
55     macro(deviceorientation) \
56     macro(display) \
57     macro(downloading) \
58     macro(drag) \
59     macro(dragend) \
60     macro(dragenter) \
61     macro(dragleave) \
62     macro(dragover) \
63     macro(dragstart) \
64     macro(drop) \
65     macro(error) \
66     macro(focus) \
67     macro(focusin) \
68     macro(focusout) \
69     macro(hashchange) \
70     macro(input) \
71     macro(invalid) \
72     macro(keydown) \
73     macro(keypress) \
74     macro(keyup) \
75     macro(load) \
76     macro(loadstart) \
77     macro(message) \
78     macro(mousedown) \
79     macro(mousemove) \
80     macro(mouseout) \
81     macro(mouseover) \
82     macro(mouseup) \
83     macro(mousewheel) \
84     macro(noupdate) \
85     macro(obsolete) \
86     macro(offline) \
87     macro(online) \
88     macro(open) \
89     macro(overflowchanged) \
90     macro(pagehide) \
91     macro(pageshow) \
92     macro(paste) \
93     macro(popstate) \
94     macro(readystatechange) \
95     macro(reset) \
96     macro(resize) \
97     macro(scroll) \
98     macro(search) \
99     macro(select) \
100     macro(selectstart) \
101     macro(storage) \
102     macro(submit) \
103     macro(textInput) \
104     macro(unload) \
105     macro(updateready) \
106     macro(write) \
107     macro(writeend) \
108     macro(writestart) \
109     macro(zoom) \
110     \
111     macro(DOMActivate) \
112     macro(DOMFocusIn) \
113     macro(DOMFocusOut) \
114     macro(DOMAttrModified) \
115     macro(DOMCharacterDataModified) \
116     macro(DOMNodeInserted) \
117     macro(DOMNodeInsertedIntoDocument) \
118     macro(DOMNodeRemoved) \
119     macro(DOMNodeRemovedFromDocument) \
120     macro(DOMSubtreeModified) \
121     macro(DOMContentLoaded) \
122     \
123     macro(webkitBeforeTextInserted) \
124     macro(webkitEditableContentChanged) \
125     \
126     macro(canplay) \
127     macro(canplaythrough) \
128     macro(durationchange) \
129     macro(emptied) \
130     macro(ended) \
131     macro(loadeddata) \
132     macro(loadedmetadata) \
133     macro(pause) \
134     macro(play) \
135     macro(playing) \
136     macro(ratechange) \
137     macro(seeked) \
138     macro(seeking) \
139     macro(timeupdate) \
140     macro(volumechange) \
141     macro(waiting) \
142     \
143     macro(webkitbeginfullscreen) \
144     macro(webkitendfullscreen) \
145     \
146     macro(progress) \
147     macro(stalled) \
148     macro(suspend) \
149     \
150     macro(webkitAnimationEnd) \
151     macro(webkitAnimationStart) \
152     macro(webkitAnimationIteration) \
153     \
154     macro(webkitTransitionEnd) \
155     \
156     macro(orientationchange) \
157     \
158     macro(timeout) \
159     \
160     macro(touchstart) \
161     macro(touchmove) \
162     macro(touchend) \
163     macro(touchcancel) \
164 /* #if PLATFORM(ANDROID) */ \
165     macro(touchlongpress) \
166     macro(touchdoubletap) \
167 /* #endif */ \
168     \
169     macro(success) \
170     \
171     macro(loadend) \
172     \
173     macro(webkitfullscreenchange) \
174     \
175     macro(webkitspeechchange) \
176     \
177     macro(webglcontextlost) \
178     macro(webglcontextrestored) \
179     macro(webglcontextcreationerror) \
180     \
181     macro(audioprocess) \
182     \
183 // end of DOM_EVENT_NAMES_FOR_EACH
184
185     class EventNames : public Noncopyable {
186         int dummy; // Needed to make initialization macro work.
187         // Private to prevent accidental call to EventNames() instead of eventNames()
188         EventNames();
189         friend class ThreadGlobalData;
190
191     public:
192         #define DOM_EVENT_NAMES_DECLARE(name) AtomicString name##Event;
193         DOM_EVENT_NAMES_FOR_EACH(DOM_EVENT_NAMES_DECLARE)
194         #undef DOM_EVENT_NAMES_DECLARE
195     };
196
197     inline EventNames& eventNames()
198     {
199         return threadGlobalData().eventNames();
200     }
201
202 }
203
204 #endif