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"
16class WindowBindingHandlerDelegate;
18class DirectManipulationEventHandler;
52 DWORD viewportHandlerCookie_;
54 Microsoft::WRL::ComPtr<IDirectManipulationManager> manager_;
56 Microsoft::WRL::ComPtr<IDirectManipulationUpdateManager> updateManager_;
58 Microsoft::WRL::ComPtr<IDirectManipulationViewport> viewport_;
69 public IDirectManipulationViewportEventHandler,
70 public IDirectManipulationInteractionEventHandler {
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;
ULONG STDMETHODCALLTYPE Release() override
HRESULT STDMETHODCALLTYPE OnViewportUpdated(IDirectManipulationViewport *viewport) override
STDMETHODIMP QueryInterface(REFIID iid, void **ppv) override
HRESULT STDMETHODCALLTYPE OnInteraction(IDirectManipulationViewport2 *viewport, DIRECTMANIPULATION_INTERACTION_TYPE interaction) override
ULONG STDMETHODCALLTYPE AddRef() override
friend class DirectManipulationOwner
DirectManipulationEventHandler(DirectManipulationOwner *owner)
HRESULT STDMETHODCALLTYPE OnViewportStatusChanged(IDirectManipulationViewport *viewport, DIRECTMANIPULATION_STATUS current, DIRECTMANIPULATION_STATUS previous) override
HRESULT STDMETHODCALLTYPE OnContentUpdated(IDirectManipulationViewport *viewport, IDirectManipulationContent *content) override
virtual void SetContact(UINT contactId)
void SetBindingHandlerDelegate(WindowBindingHandlerDelegate *binding_handler_delegate)
virtual ~DirectManipulationOwner()=default
WindowBindingHandlerDelegate * binding_handler_delegate
int Init(unsigned int width, unsigned int height)
void ResizeViewport(unsigned int width, unsigned int height)
DirectManipulationOwner(FlutterWindow *window)
union flutter::testing::@2836::KeyboardChange::@76 content
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
#define FML_FRIEND_REF_COUNTED_THREAD_SAFE(T)
#define FML_FRIEND_MAKE_REF_COUNTED(T)