2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / WebCore / dom / EventNames.h
blobf7bb9507a9dcb22085862dd12b4f7a32d84eda42
1 /*
2 * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Jon Shier (jshier@iastate.edu)
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.
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.
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.
22 #ifndef EventNames_h
23 #define EventNames_h
25 #include "AtomicString.h"
27 namespace WTF {
28 template<typename> class ThreadSpecific;
31 namespace WebCore {
33 #define DOM_EVENT_NAMES_FOR_EACH(macro) \
35 macro(abort) \
36 macro(beforecopy) \
37 macro(beforecut) \
38 macro(beforepaste) \
39 macro(beforeunload) \
40 macro(blur) \
41 macro(cached) \
42 macro(change) \
43 macro(checking) \
44 macro(click) \
45 macro(close) \
46 macro(contextmenu) \
47 macro(copy) \
48 macro(cut) \
49 macro(dblclick) \
50 macro(downloading) \
51 macro(drag) \
52 macro(dragend) \
53 macro(dragenter) \
54 macro(dragleave) \
55 macro(dragover) \
56 macro(dragstart) \
57 macro(drop) \
58 macro(error) \
59 macro(focus) \
60 macro(input) \
61 macro(keydown) \
62 macro(keypress) \
63 macro(keyup) \
64 macro(load) \
65 macro(loadstart) \
66 macro(message) \
67 macro(mousedown) \
68 macro(mousemove) \
69 macro(mouseout) \
70 macro(mouseover) \
71 macro(mouseup) \
72 macro(mousewheel) \
73 macro(noupdate) \
74 macro(offline) \
75 macro(online) \
76 macro(overflowchanged) \
77 macro(paste) \
78 macro(readystatechange) \
79 macro(reset) \
80 macro(resize) \
81 macro(scroll) \
82 macro(search) \
83 macro(select) \
84 macro(selectstart) \
85 macro(storage) \
86 macro(submit) \
87 macro(textInput) \
88 macro(unload) \
89 macro(updateready) \
90 macro(zoom) \
92 macro(DOMActivate) \
93 macro(DOMAttrModified) \
94 macro(DOMCharacterDataModified) \
95 macro(DOMFocusIn) \
96 macro(DOMFocusOut) \
97 macro(DOMNodeInserted) \
98 macro(DOMNodeInsertedIntoDocument) \
99 macro(DOMNodeRemoved) \
100 macro(DOMNodeRemovedFromDocument) \
101 macro(DOMSubtreeModified) \
102 macro(DOMContentLoaded) \
104 macro(webkitBeforeTextInserted) \
105 macro(webkitEditableContentChanged) \
107 macro(canshowcurrentframe) \
108 macro(canplay) \
109 macro(canplaythrough) \
110 macro(dataunavailable) \
111 macro(durationchange) \
112 macro(emptied) \
113 macro(ended) \
114 macro(loadedfirstframe) \
115 macro(loadedmetadata) \
116 macro(pause) \
117 macro(play) \
118 macro(ratechange) \
119 macro(timeupdate) \
120 macro(volumechange) \
121 macro(waiting) \
123 macro(progress) \
124 macro(stalled) \
126 macro(webkitAnimationEnd) \
127 macro(webkitAnimationStart) \
128 macro(webkitAnimationIteration) \
130 macro(webkitTransitionEnd) \
132 // end of DOM_EVENT_NAMES_FOR_EACH
134 class EventNames {
135 friend class WTF::ThreadSpecific<EventNames>;
137 EventNames();
138 int dummy; // Needed to make initialization macro work.
140 public:
141 static void init();
143 #define DOM_EVENT_NAMES_DECLARE(name) AtomicString name##Event;
144 DOM_EVENT_NAMES_FOR_EACH(DOM_EVENT_NAMES_DECLARE)
145 #undef DOM_EVENT_NAMES_DECLARE
148 EventNames& eventNames();
152 #endif