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__
11 #include "mozilla/TypedEnum.h"
14 * XXX Following enums should be in BasicEvents.h. However, currently, it's
15 * impossible to use foward delearation for enum.
19 * Return status for event processors.
23 // The event is ignored, do default processing
24 nsEventStatus_eIgnore
,
25 // The event is consumed, don't do default processing
26 nsEventStatus_eConsumeNoDefault
,
27 // The event is consumed, but do default processing
28 nsEventStatus_eConsumeDoDefault
33 typedef uint16_t Modifiers
;
35 #define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) \
36 KEY_NAME_INDEX_##aCPPName,
40 #include "nsDOMKeyNameList.h"
41 // If a DOM keyboard event is synthesized by script, this is used. Then,
42 // specified key name should be stored and use it as .key value.
43 KEY_NAME_INDEX_USE_STRING
46 #undef NS_DEFINE_KEYNAME
48 #define NS_DEFINE_COMMAND(aName, aCommandStr) , Command##aName
50 typedef int8_t CommandInt
;
51 enum Command
MOZ_ENUM_TYPE(CommandInt
)
55 #include "mozilla/CommandList.h"
57 #undef NS_DEFINE_COMMAND
59 } // namespace mozilla
62 * All header files should include this header instead of *Events.h.
67 #define NS_EVENT_CLASS(aPrefix, aName) class aPrefix##aName;
68 #define NS_ROOT_EVENT_CLASS(aPrefix, aName) NS_EVENT_CLASS(aPrefix, aName)
70 #include "mozilla/EventClassList.h"
73 #undef NS_ROOT_EVENT_CLASS
79 struct AlternativeCharCode
;
82 struct TextRangeStyle
;
87 } // namespace mozilla
89 #endif // mozilla_EventForwards_h__