dom/events/SimpleGestureEvent.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #ifndef mozilla_dom_SimpleGestureEvent_h_
michael@0 6 #define mozilla_dom_SimpleGestureEvent_h_
michael@0 7
michael@0 8 #include "nsIDOMSimpleGestureEvent.h"
michael@0 9 #include "mozilla/dom/MouseEvent.h"
michael@0 10 #include "mozilla/dom/SimpleGestureEventBinding.h"
michael@0 11 #include "mozilla/EventForwards.h"
michael@0 12
michael@0 13 class nsPresContext;
michael@0 14
michael@0 15 namespace mozilla {
michael@0 16 namespace dom {
michael@0 17
michael@0 18 class SimpleGestureEvent : public MouseEvent,
michael@0 19 public nsIDOMSimpleGestureEvent
michael@0 20 {
michael@0 21 public:
michael@0 22 SimpleGestureEvent(EventTarget* aOwner,
michael@0 23 nsPresContext* aPresContext,
michael@0 24 WidgetSimpleGestureEvent* aEvent);
michael@0 25
michael@0 26 NS_DECL_ISUPPORTS_INHERITED
michael@0 27
michael@0 28 NS_DECL_NSIDOMSIMPLEGESTUREEVENT
michael@0 29
michael@0 30 // Forward to base class
michael@0 31 NS_FORWARD_TO_MOUSEEVENT
michael@0 32
michael@0 33 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
michael@0 34 {
michael@0 35 return SimpleGestureEventBinding::Wrap(aCx, this);
michael@0 36 }
michael@0 37
michael@0 38 uint32_t AllowedDirections();
michael@0 39 uint32_t Direction();
michael@0 40 double Delta();
michael@0 41 uint32_t ClickCount();
michael@0 42
michael@0 43 void InitSimpleGestureEvent(const nsAString& aType,
michael@0 44 bool aCanBubble,
michael@0 45 bool aCancelable,
michael@0 46 nsIDOMWindow* aView,
michael@0 47 int32_t aDetail,
michael@0 48 int32_t aScreenX,
michael@0 49 int32_t aScreenY,
michael@0 50 int32_t aClientX,
michael@0 51 int32_t aClientY,
michael@0 52 bool aCtrlKey,
michael@0 53 bool aAltKey,
michael@0 54 bool aShiftKey,
michael@0 55 bool aMetaKey,
michael@0 56 uint16_t aButton,
michael@0 57 EventTarget* aRelatedTarget,
michael@0 58 uint32_t aAllowedDirections,
michael@0 59 uint32_t aDirection,
michael@0 60 double aDelta,
michael@0 61 uint32_t aClickCount,
michael@0 62 ErrorResult& aRv)
michael@0 63 {
michael@0 64 aRv = InitSimpleGestureEvent(aType, aCanBubble, aCancelable,
michael@0 65 aView, aDetail, aScreenX, aScreenY,
michael@0 66 aClientX, aClientY, aCtrlKey, aAltKey,
michael@0 67 aShiftKey, aMetaKey, aButton,
michael@0 68 aRelatedTarget, aAllowedDirections,
michael@0 69 aDirection, aDelta, aClickCount);
michael@0 70 }
michael@0 71 };
michael@0 72
michael@0 73 } // namespace dom
michael@0 74 } // namespace mozilla
michael@0 75
michael@0 76 #endif // mozilla_dom_SimpleGestureEvent_h_

mercurial