1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef DirectManipulationOwner_h__
7 #define DirectManipulationOwner_h__
11 #include "nsIWidget.h" // for TouchpadGesturePhase
14 class IDirectManipulationManager
;
15 class IDirectManipulationUpdateManager
;
16 class IDirectManipulationViewport
;
21 class DManipEventHandler
;
23 class DirectManipulationOwner
{
25 typedef mozilla::LayoutDeviceIntRect LayoutDeviceIntRect
;
27 explicit DirectManipulationOwner(nsWindow
* aWindow
);
28 ~DirectManipulationOwner();
29 void Init(const LayoutDeviceIntRect
& aBounds
);
30 void ResizeViewport(const LayoutDeviceIntRect
& aBounds
);
33 void SetContact(UINT aContactId
);
37 static void SynthesizeNativeTouchpadPan(
38 nsWindow
* aWindow
, nsIWidget::TouchpadGesturePhase aEventPhase
,
39 LayoutDeviceIntPoint aPoint
, double aDeltaX
, double aDeltaY
,
40 int32_t aModifierFlags
);
44 #if !defined(__MINGW32__) && !defined(__MINGW64__)
45 DWORD mDmViewportHandlerCookie
;
46 RefPtr
<IDirectManipulationManager
> mDmManager
;
47 RefPtr
<IDirectManipulationUpdateManager
> mDmUpdateManager
;
48 RefPtr
<IDirectManipulationViewport
> mDmViewport
;
49 RefPtr
<DManipEventHandler
> mDmHandler
;
54 } // namespace mozilla
56 #endif // #ifndef DirectManipulationOwner_h__