Bug 1861709 replace AudioCallbackDriver::ThreadRunning() assertions that mean to...
[gecko.git] / widget / windows / DirectManipulationOwner.h
blobb4d5877d70804ffa6580803cc5af3634bca5def9
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__
9 #include <windows.h>
10 #include "Units.h"
11 #include "nsIWidget.h" // for TouchpadGesturePhase
13 class nsWindow;
14 class IDirectManipulationManager;
15 class IDirectManipulationUpdateManager;
16 class IDirectManipulationViewport;
18 namespace mozilla {
19 namespace widget {
21 class DManipEventHandler;
23 class DirectManipulationOwner {
24 public:
25 typedef mozilla::LayoutDeviceIntRect LayoutDeviceIntRect;
27 explicit DirectManipulationOwner(nsWindow* aWindow);
28 ~DirectManipulationOwner();
29 void Init(const LayoutDeviceIntRect& aBounds);
30 void ResizeViewport(const LayoutDeviceIntRect& aBounds);
31 void Destroy();
33 void SetContact(UINT aContactId);
35 void Update();
37 static void SynthesizeNativeTouchpadPan(
38 nsWindow* aWindow, nsIWidget::TouchpadGesturePhase aEventPhase,
39 LayoutDeviceIntPoint aPoint, double aDeltaX, double aDeltaY,
40 int32_t aModifierFlags);
42 private:
43 nsWindow* mWindow;
44 DWORD mDmViewportHandlerCookie;
45 RefPtr<IDirectManipulationManager> mDmManager;
46 RefPtr<IDirectManipulationUpdateManager> mDmUpdateManager;
47 RefPtr<IDirectManipulationViewport> mDmViewport;
48 RefPtr<DManipEventHandler> mDmHandler;
51 } // namespace widget
52 } // namespace mozilla
54 #endif // #ifndef DirectManipulationOwner_h__