michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_SimpleGestureEvent_h_ michael@0: #define mozilla_dom_SimpleGestureEvent_h_ michael@0: michael@0: #include "nsIDOMSimpleGestureEvent.h" michael@0: #include "mozilla/dom/MouseEvent.h" michael@0: #include "mozilla/dom/SimpleGestureEventBinding.h" michael@0: #include "mozilla/EventForwards.h" michael@0: michael@0: class nsPresContext; michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: class SimpleGestureEvent : public MouseEvent, michael@0: public nsIDOMSimpleGestureEvent michael@0: { michael@0: public: michael@0: SimpleGestureEvent(EventTarget* aOwner, michael@0: nsPresContext* aPresContext, michael@0: WidgetSimpleGestureEvent* aEvent); michael@0: michael@0: NS_DECL_ISUPPORTS_INHERITED michael@0: michael@0: NS_DECL_NSIDOMSIMPLEGESTUREEVENT michael@0: michael@0: // Forward to base class michael@0: NS_FORWARD_TO_MOUSEEVENT michael@0: michael@0: virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE michael@0: { michael@0: return SimpleGestureEventBinding::Wrap(aCx, this); michael@0: } michael@0: michael@0: uint32_t AllowedDirections(); michael@0: uint32_t Direction(); michael@0: double Delta(); michael@0: uint32_t ClickCount(); michael@0: michael@0: void InitSimpleGestureEvent(const nsAString& aType, michael@0: bool aCanBubble, michael@0: bool aCancelable, michael@0: nsIDOMWindow* aView, michael@0: int32_t aDetail, michael@0: int32_t aScreenX, michael@0: int32_t aScreenY, michael@0: int32_t aClientX, michael@0: int32_t aClientY, michael@0: bool aCtrlKey, michael@0: bool aAltKey, michael@0: bool aShiftKey, michael@0: bool aMetaKey, michael@0: uint16_t aButton, michael@0: EventTarget* aRelatedTarget, michael@0: uint32_t aAllowedDirections, michael@0: uint32_t aDirection, michael@0: double aDelta, michael@0: uint32_t aClickCount, michael@0: ErrorResult& aRv) michael@0: { michael@0: aRv = InitSimpleGestureEvent(aType, aCanBubble, aCancelable, michael@0: aView, aDetail, aScreenX, aScreenY, michael@0: aClientX, aClientY, aCtrlKey, aAltKey, michael@0: aShiftKey, aMetaKey, aButton, michael@0: aRelatedTarget, aAllowedDirections, michael@0: aDirection, aDelta, aClickCount); michael@0: } michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_dom_SimpleGestureEvent_h_