dom/events/SimpleGestureEvent.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial