Bug 920425 part.1 Create widget/EventClassList.h r=roc

This commit is contained in:
Masayuki Nakano 2013-10-18 15:10:20 +09:00
parent 976f41f65e
commit 20c12706e5
3 changed files with 69 additions and 41 deletions

58
widget/EventClassList.h Normal file
View File

@ -0,0 +1,58 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* This header file lists up all event classes and related structs.
* Define NS_EVENT_CLASS(aPrefix, aName) and NS_ROOT_EVENT_CLASS(aPrefix, aName)
* before including this.
* If an event name is WidgetInputEvent, aPrefix is "Widget" and aName is
* "InputEvent". NS_ROOT_EVENT_CLASS() is only used for WidgetEvent for
* allowing special handling for it. If you don't need such special handling,
* you can define it as:
* #define NS_ROOT_EVENT_CLASS(aPrefix, aName) NS_EVENT_CLASS(aPrefix, aName)
*/
// BasicEvents.h
NS_ROOT_EVENT_CLASS(Widget, Event)
NS_EVENT_CLASS(Widget, GUIEvent)
NS_EVENT_CLASS(Widget, InputEvent)
NS_EVENT_CLASS(Internal, UIEvent)
// TextEvents.h
NS_EVENT_CLASS(Widget, KeyboardEvent)
NS_EVENT_CLASS(Widget, TextEvent)
NS_EVENT_CLASS(Widget, CompositionEvent)
NS_EVENT_CLASS(Widget, QueryContentEvent)
NS_EVENT_CLASS(Widget, SelectionEvent)
// MouseEvents.h
NS_EVENT_CLASS(Widget, MouseEventBase)
NS_EVENT_CLASS(Widget, MouseEvent)
NS_EVENT_CLASS(Widget, DragEvent)
NS_EVENT_CLASS(Widget, MouseScrollEvent)
NS_EVENT_CLASS(Widget, WheelEvent)
// TouchEvents.h
NS_EVENT_CLASS(Widget, GestureNotifyEvent)
NS_EVENT_CLASS(Widget, SimpleGestureEvent)
NS_EVENT_CLASS(Widget, TouchEvent)
// ContentEvents.h
NS_EVENT_CLASS(Internal, ScriptErrorEvent)
NS_EVENT_CLASS(Internal, ScrollPortEvent)
NS_EVENT_CLASS(Internal, ScrollAreaEvent)
NS_EVENT_CLASS(Internal, FormEvent)
NS_EVENT_CLASS(Internal, ClipboardEvent)
NS_EVENT_CLASS(Internal, FocusEvent)
NS_EVENT_CLASS(Internal, TransitionEvent)
NS_EVENT_CLASS(Internal, AnimationEvent)
// MiscEvents.h
NS_EVENT_CLASS(Widget, CommandEvent)
NS_EVENT_CLASS(Widget, ContentCommandEvent)
NS_EVENT_CLASS(Widget, PluginEvent)
// MutationEvent.h (content/events/public)
NS_EVENT_CLASS(Internal, MutationEvent)

View File

@ -49,14 +49,18 @@ enum KeyNameIndex
* All header files should include this header instead of *Events.h.
*/
// BasicEvents.h
namespace mozilla {
struct EventFlags;
class WidgetEvent;
class WidgetGUIEvent;
class WidgetInputEvent;
class InternalUIEvent;
#define NS_EVENT_CLASS(aPrefix, aName) class aPrefix##aName;
#define NS_ROOT_EVENT_CLASS(aPrefix, aName) NS_EVENT_CLASS(aPrefix, aName)
#include "mozilla/EventClassList.h"
#undef NS_EVENT_CLASS
#undef NS_ROOT_EVENT_CLASS
// BasicEvents.h
struct EventFlags;
// TextEvents.h
struct AlternativeCharCode;
@ -65,41 +69,6 @@ struct TextRange;
typedef TextRange* TextRangeArray;
class WidgetKeyboardEvent;
class WidgetTextEvent;
class WidgetCompositionEvent;
class WidgetQueryContentEvent;
class WidgetSelectionEvent;
// MouseEvents.h
class WidgetMouseEventBase;
class WidgetMouseEvent;
class WidgetDragEvent;
class WidgetMouseScrollEvent;
class WidgetWheelEvent;
// TouchEvents.h
class WidgetGestureNotifyEvent;
class WidgetSimpleGestureEvent;
class WidgetTouchEvent;
// ContentEvents.h
class InternalScriptErrorEvent;
class InternalScrollPortEvent;
class InternalScrollAreaEvent;
class InternalFormEvent;
class InternalClipboardEvent;
class InternalFocusEvent;
class InternalTransitionEvent;
class InternalAnimationEvent;
// MiscEvents.h
class WidgetCommandEvent;
class WidgetContentCommandEvent;
class WidgetPluginEvent;
// MutationEvent.h (content/events/public)
class InternalMutationEvent;
} // namespace mozilla
#endif // mozilla_EventForwards_h__

View File

@ -112,6 +112,7 @@ EXPORTS += [
EXPORTS.mozilla += [
'BasicEvents.h',
'ContentEvents.h',
'EventClassList.h',
'EventForwards.h',
'LookAndFeel.h',
'MiscEvents.h',