Bug 983971 - Do not use gralloc for small size on ICS gonk r=nical
[gecko.git] / widget / EventForwards.h
blob2310483176491fdd51307492ac1233dad9f7c4c6
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 #include "mozilla/TypedEnum.h"
13 /**
14 * XXX Following enums should be in BasicEvents.h. However, currently, it's
15 * impossible to use foward delearation for enum.
18 /**
19 * Return status for event processors.
21 enum nsEventStatus
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
31 namespace mozilla {
33 typedef uint16_t Modifiers;
35 #define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) \
36 KEY_NAME_INDEX_##aCPPName,
38 enum KeyNameIndex
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)
53 CommandDoNothing
55 #include "mozilla/CommandList.h"
57 #undef NS_DEFINE_COMMAND
59 } // namespace mozilla
61 /**
62 * All header files should include this header instead of *Events.h.
65 namespace mozilla {
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"
72 #undef NS_EVENT_CLASS
73 #undef NS_ROOT_EVENT_CLASS
75 // BasicEvents.h
76 struct EventFlags;
78 // TextEvents.h
79 struct AlternativeCharCode;
81 // TextRange.h
82 struct TextRangeStyle;
83 struct TextRange;
85 class TextRangeArray;
87 } // namespace mozilla
89 #endif // mozilla_EventForwards_h__