2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
2001-07-15 22:57:29 +00:00
|
|
|
|
2013-09-24 10:04:14 +00:00
|
|
|
#ifndef mozilla_EventForwards_h__
|
|
|
|
#define mozilla_EventForwards_h__
|
2001-07-15 22:57:29 +00:00
|
|
|
|
2013-07-30 14:25:31 +00:00
|
|
|
#include <stdint.h>
|
2012-08-08 21:08:17 +00:00
|
|
|
|
2001-07-15 22:57:29 +00:00
|
|
|
/**
|
2013-09-24 10:04:14 +00:00
|
|
|
* XXX Following enums should be in BasicEvents.h. However, currently, it's
|
|
|
|
* impossible to use foward delearation for enum.
|
2001-07-15 22:57:29 +00:00
|
|
|
*/
|
|
|
|
|
2009-04-01 21:59:02 +00:00
|
|
|
/**
|
2013-09-24 10:04:14 +00:00
|
|
|
* Return status for event processors.
|
2009-04-01 21:59:02 +00:00
|
|
|
*/
|
2013-09-24 10:04:14 +00:00
|
|
|
enum nsEventStatus
|
|
|
|
{
|
|
|
|
// The event is ignored, do default processing
|
|
|
|
nsEventStatus_eIgnore,
|
|
|
|
// The event is consumed, don't do default processing
|
|
|
|
nsEventStatus_eConsumeNoDefault,
|
|
|
|
// The event is consumed, but do default processing
|
|
|
|
nsEventStatus_eConsumeDoDefault
|
2009-04-01 21:59:02 +00:00
|
|
|
};
|
|
|
|
|
2012-04-25 03:00:01 +00:00
|
|
|
namespace mozilla {
|
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
typedef uint16_t Modifiers;
|
2012-04-25 03:00:01 +00:00
|
|
|
|
2013-04-24 03:49:46 +00:00
|
|
|
#define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) \
|
|
|
|
KEY_NAME_INDEX_##aCPPName,
|
|
|
|
|
2013-09-24 10:04:14 +00:00
|
|
|
enum KeyNameIndex
|
|
|
|
{
|
2013-04-24 03:49:46 +00:00
|
|
|
#include "nsDOMKeyNameList.h"
|
|
|
|
// There shouldn't be "," at the end of enum definition, this dummy item
|
|
|
|
// avoids bustage on some platforms.
|
|
|
|
NUMBER_OF_KEY_NAME_INDEX
|
|
|
|
};
|
|
|
|
|
|
|
|
#undef NS_DEFINE_KEYNAME
|
|
|
|
|
2012-04-25 03:00:01 +00:00
|
|
|
} // namespace mozilla
|
|
|
|
|
2013-09-24 10:04:14 +00:00
|
|
|
/**
|
|
|
|
* All header files should include this header instead of *Events.h.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// BasicEvents.h
|
|
|
|
namespace mozilla {
|
|
|
|
struct EventFlags;
|
|
|
|
|
2013-09-24 10:04:14 +00:00
|
|
|
class WidgetEvent;
|
|
|
|
class WidgetGUIEvent;
|
|
|
|
class WidgetInputEvent;
|
|
|
|
class InternalUIEvent;
|
2013-09-24 10:04:14 +00:00
|
|
|
|
|
|
|
// TextEvents.h
|
2013-09-24 10:04:15 +00:00
|
|
|
struct AlternativeCharCode;
|
|
|
|
struct TextRangeStyle;
|
|
|
|
struct TextRange;
|
|
|
|
|
|
|
|
typedef TextRange* TextRangeArray;
|
2013-09-24 10:04:14 +00:00
|
|
|
|
2013-09-24 10:04:15 +00:00
|
|
|
class WidgetKeyboardEvent;
|
|
|
|
class WidgetTextEvent;
|
|
|
|
class WidgetCompositionEvent;
|
|
|
|
class WidgetQueryContentEvent;
|
|
|
|
class WidgetSelectionEvent;
|
2013-09-24 10:04:14 +00:00
|
|
|
|
|
|
|
// MouseEvents.h
|
2013-09-24 10:04:15 +00:00
|
|
|
class WidgetMouseEventBase;
|
|
|
|
class WidgetMouseEvent;
|
|
|
|
class WidgetDragEvent;
|
|
|
|
class WidgetMouseScrollEvent;
|
|
|
|
class WidgetWheelEvent;
|
2013-09-24 10:04:14 +00:00
|
|
|
|
|
|
|
// TouchEvents.h
|
2013-09-24 10:04:15 +00:00
|
|
|
class WidgetGestureNotifyEvent;
|
|
|
|
class WidgetSimpleGestureEvent;
|
|
|
|
class WidgetTouchEvent;
|
2013-09-24 10:04:14 +00:00
|
|
|
|
|
|
|
// ContentEvents.h
|
2013-09-24 10:04:15 +00:00
|
|
|
class InternalScriptErrorEvent;
|
|
|
|
class InternalScrollPortEvent;
|
|
|
|
class InternalScrollAreaEvent;
|
|
|
|
class InternalFormEvent;
|
|
|
|
class InternalClipboardEvent;
|
|
|
|
class InternalFocusEvent;
|
|
|
|
class InternalTransitionEvent;
|
|
|
|
class InternalAnimationEvent;
|
|
|
|
} // namespace mozilla
|
2013-09-24 10:04:14 +00:00
|
|
|
|
|
|
|
// MiscEvents.h
|
|
|
|
class nsCommandEvent;
|
|
|
|
class nsContentCommandEvent;
|
|
|
|
class nsPluginEvent;
|
|
|
|
|
|
|
|
// content/events/public/nsMutationEvent.h
|
|
|
|
class nsMutationEvent;
|
|
|
|
|
2013-09-24 10:04:14 +00:00
|
|
|
// TODO: Remove following typedefs
|
2013-09-24 10:04:15 +00:00
|
|
|
typedef mozilla::WidgetEvent nsEvent;
|
|
|
|
typedef mozilla::WidgetGUIEvent nsGUIEvent;
|
|
|
|
typedef mozilla::WidgetInputEvent nsInputEvent;
|
|
|
|
typedef mozilla::InternalUIEvent nsUIEvent;
|
|
|
|
typedef mozilla::AlternativeCharCode nsAlternativeCharCode;
|
|
|
|
typedef mozilla::WidgetKeyboardEvent nsKeyEvent;
|
|
|
|
typedef mozilla::TextRangeStyle nsTextRangeStyle;
|
|
|
|
typedef mozilla::TextRange nsTextRange;
|
|
|
|
typedef mozilla::TextRangeArray nsTextRangeArray;
|
|
|
|
typedef mozilla::WidgetTextEvent nsTextEvent;
|
|
|
|
typedef mozilla::WidgetCompositionEvent nsCompositionEvent;
|
|
|
|
typedef mozilla::WidgetQueryContentEvent nsQueryContentEvent;
|
|
|
|
typedef mozilla::WidgetSelectionEvent nsSelectionEvent;
|
2013-09-24 10:04:15 +00:00
|
|
|
typedef mozilla::WidgetMouseEventBase nsMouseEvent_base;
|
|
|
|
typedef mozilla::WidgetMouseEvent nsMouseEvent;
|
|
|
|
typedef mozilla::WidgetDragEvent nsDragEvent;
|
|
|
|
typedef mozilla::WidgetMouseScrollEvent nsMouseScrollEvent;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
typedef WidgetWheelEvent WheelEvent;
|
|
|
|
}
|
2013-09-24 10:04:14 +00:00
|
|
|
|
2013-09-24 10:04:15 +00:00
|
|
|
typedef mozilla::WidgetGestureNotifyEvent nsGestureNotifyEvent;
|
|
|
|
typedef mozilla::WidgetSimpleGestureEvent nsSimpleGestureEvent;
|
|
|
|
typedef mozilla::WidgetTouchEvent nsTouchEvent;
|
2013-09-24 10:04:15 +00:00
|
|
|
typedef mozilla::InternalScriptErrorEvent nsScriptErrorEvent;
|
|
|
|
typedef mozilla::InternalScrollPortEvent nsScrollPortEvent;
|
|
|
|
typedef mozilla::InternalScrollAreaEvent nsScrollAreaEvent;
|
|
|
|
typedef mozilla::InternalFormEvent nsFormEvent;
|
|
|
|
typedef mozilla::InternalClipboardEvent nsClipboardEvent;
|
|
|
|
typedef mozilla::InternalFocusEvent nsFocusEvent;
|
|
|
|
typedef mozilla::InternalTransitionEvent nsTransitionEvent;
|
|
|
|
typedef mozilla::InternalAnimationEvent nsAnimationEvent;
|
2013-09-24 10:04:15 +00:00
|
|
|
|
2013-09-24 10:04:14 +00:00
|
|
|
#endif // mozilla_EventForwards_h__
|