Merge m-c to inbound.
[gecko.git] / widget / EventForwards.h
blobe97ce3be902cf893d51eea46cdf86bd9c10b9dcb
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_EventForwards_h__
7 #define mozilla_EventForwards_h__
9 #include <stdint.h>
11 /**
12 * XXX Following enums should be in BasicEvents.h. However, currently, it's
13 * impossible to use foward delearation for enum.
16 /**
17 * Return status for event processors.
19 enum nsEventStatus
21 // The event is ignored, do default processing
22 nsEventStatus_eIgnore,
23 // The event is consumed, don't do default processing
24 nsEventStatus_eConsumeNoDefault,
25 // The event is consumed, but do default processing
26 nsEventStatus_eConsumeDoDefault
29 namespace mozilla {
31 typedef uint16_t Modifiers;
33 #define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) \
34 KEY_NAME_INDEX_##aCPPName,
36 enum KeyNameIndex
38 #include "nsDOMKeyNameList.h"
39 // If a DOM keyboard event is synthesized by script, this is used. Then,
40 // specified key name should be stored and use it as .key value.
41 KEY_NAME_INDEX_USE_STRING
44 #undef NS_DEFINE_KEYNAME
46 } // namespace mozilla
48 /**
49 * All header files should include this header instead of *Events.h.
52 namespace mozilla {
54 #define NS_EVENT_CLASS(aPrefix, aName) class aPrefix##aName;
55 #define NS_ROOT_EVENT_CLASS(aPrefix, aName) NS_EVENT_CLASS(aPrefix, aName)
57 #include "mozilla/EventClassList.h"
59 #undef NS_EVENT_CLASS
60 #undef NS_ROOT_EVENT_CLASS
62 // BasicEvents.h
63 struct EventFlags;
65 // TextEvents.h
66 struct AlternativeCharCode;
68 // TextRange.h
69 struct TextRangeStyle;
70 struct TextRange;
72 typedef TextRange* TextRangeArray;
74 } // namespace mozilla
76 #endif // mozilla_EventForwards_h__