5 #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_DIRECT_MANIPULATION_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_DIRECT_MANIPULATION_H_
8 #include "flutter/fml/memory/ref_counted.h"
10 #include <wrl/client.h>
11 #include "directmanipulation.h"
16 class WindowBindingHandlerDelegate;
18 class DirectManipulationEventHandler;
28 int Init(
unsigned int width,
unsigned int height);
52 DWORD viewportHandlerCookie_;
54 Microsoft::WRL::ComPtr<IDirectManipulationManager> manager_;
56 Microsoft::WRL::ComPtr<IDirectManipulationUpdateManager> updateManager_;
58 Microsoft::WRL::ComPtr<IDirectManipulationViewport> viewport_;
60 fml::RefPtr<DirectManipulationEventHandler> handler_;
68 :
public fml::RefCountedThreadSafe<DirectManipulationEventHandler>,
69 public IDirectManipulationViewportEventHandler,
70 public IDirectManipulationInteractionEventHandler {
83 ULONG STDMETHODCALLTYPE
AddRef()
override;
86 ULONG STDMETHODCALLTYPE
Release()
override;
90 IDirectManipulationViewport* viewport,
91 DIRECTMANIPULATION_STATUS current,
92 DIRECTMANIPULATION_STATUS previous)
override;
96 IDirectManipulationViewport* viewport)
override;
100 IDirectManipulationViewport* viewport,
101 IDirectManipulationContent*
content)
override;
105 IDirectManipulationViewport2* viewport,
106 DIRECTMANIPULATION_INTERACTION_TYPE interaction)
override;
115 GestureData ConvertToGestureData(
float transform[6]);
117 int32_t GetDeviceId();
123 bool during_synthesized_reset_ =
false;
126 bool during_inertia_ =
false;
129 GestureData initial_gesture_data_ = {
136 float last_pan_x_ = 0.0;
137 float last_pan_y_ = 0.0;
138 float last_pan_delta_x_ = 0.0;
139 float last_pan_delta_y_ = 0.0;
144 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_DIRECT_MANIPULATION_H_