dom/events/PointerEvent.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/.
     4  *
     5  * Portions Copyright 2013 Microsoft Open Technologies, Inc. */
     7 #ifndef mozilla_dom_PointerEvent_h_
     8 #define mozilla_dom_PointerEvent_h_
    10 #include "mozilla/dom/MouseEvent.h"
    11 #include "mozilla/dom/PointerEventBinding.h"
    13 class nsPresContext;
    15 namespace mozilla {
    16 namespace dom {
    18 class PointerEvent : public MouseEvent
    19 {
    20 public:
    21   PointerEvent(EventTarget* aOwner,
    22                nsPresContext* aPresContext,
    23                WidgetPointerEvent* aEvent);
    25   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
    26   {
    27     return PointerEventBinding::Wrap(aCx, this);
    28   }
    30   static already_AddRefed<PointerEvent>
    31   Constructor(const GlobalObject& aGlobal,
    32               const nsAString& aType,
    33               const PointerEventInit& aParam,
    34               ErrorResult& aRv);
    36   static already_AddRefed<PointerEvent>
    37   Constructor(EventTarget* aOwner,
    38               const nsAString& aType,
    39               const PointerEventInit& aParam);
    41   int32_t PointerId();
    42   int32_t Width();
    43   int32_t Height();
    44   float Pressure();
    45   int32_t TiltX();
    46   int32_t TiltY();
    47   bool IsPrimary();
    48   void GetPointerType(nsAString& aPointerType);
    49 };
    51 } // namespace dom
    52 } // namespace mozilla
    54 #endif // mozilla_dom_PointerEvent_h_

mercurial