Bug 1793629 - Implement attention indicator for the unified extensions button, r...
[gecko.git] / widget / windows / DirectManipulationOwner.h
blobab1e8b23079d089d0fcae9e8702017260aa8310c
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 #if !defined(__MINGW32__) && !defined(__MINGW64__)
45 DWORD mDmViewportHandlerCookie;
46 RefPtr<IDirectManipulationManager> mDmManager;
47 RefPtr<IDirectManipulationUpdateManager> mDmUpdateManager;
48 RefPtr<IDirectManipulationViewport> mDmViewport;
49 RefPtr<DManipEventHandler> mDmHandler;
50 #endif
53 } // namespace widget
54 } // namespace mozilla
56 #endif // #ifndef DirectManipulationOwner_h__