#include <direct_manipulation.h>
Definition at line 67 of file direct_manipulation.h.
◆ DirectManipulationEventHandler()
◆ AddRef()
| ULONG STDMETHODCALLTYPE flutter::DirectManipulationEventHandler::AddRef |
( |
| ) |
|
|
override |
◆ OnContentUpdated()
| HRESULT flutter::DirectManipulationEventHandler::OnContentUpdated |
( |
IDirectManipulationViewport * |
viewport, |
|
|
IDirectManipulationContent * |
content |
|
) |
| |
|
override |
Definition at line 134 of file direct_manipulation.cc.
138 HRESULT hr =
content->GetContentTransform(transform, ARRAYSIZE(transform));
140 FML_LOG(ERROR) <<
"GetContentTransform failed";
143 if (!during_synthesized_reset_) {
144 GestureData data = ConvertToGestureData(transform);
145 float scale = data.scale / initial_gesture_data_.scale;
146 float pan_x = data.pan_x - initial_gesture_data_.pan_x;
147 float pan_y = data.pan_y - initial_gesture_data_.pan_y;
148 last_pan_delta_x_ = pan_x - last_pan_x_;
149 last_pan_delta_y_ = pan_y - last_pan_y_;
154 GetDeviceId(), pan_x, pan_y, scale, 0);
WindowBindingHandlerDelegate * binding_handler_delegate
virtual void OnPointerPanZoomUpdate(int32_t device_id, double pan_x, double pan_y, double scale, double rotation)=0
union flutter::testing::@93::KeyboardChange::@0 content
References flutter::DirectManipulationOwner::binding_handler_delegate, content, and flutter::WindowBindingHandlerDelegate::OnPointerPanZoomUpdate().
◆ OnInteraction()
| HRESULT flutter::DirectManipulationEventHandler::OnInteraction |
( |
IDirectManipulationViewport2 * |
viewport, |
|
|
DIRECTMANIPULATION_INTERACTION_TYPE |
interaction |
|
) |
| |
|
override |
◆ OnViewportStatusChanged()
| HRESULT flutter::DirectManipulationEventHandler::OnViewportStatusChanged |
( |
IDirectManipulationViewport * |
viewport, |
|
|
DIRECTMANIPULATION_STATUS |
current, |
|
|
DIRECTMANIPULATION_STATUS |
previous |
|
) |
| |
|
override |
Definition at line 65 of file direct_manipulation.cc.
69 if (during_synthesized_reset_) {
70 during_synthesized_reset_ = current != DIRECTMANIPULATION_READY;
73 during_inertia_ = current == DIRECTMANIPULATION_INERTIA;
74 if (current == DIRECTMANIPULATION_RUNNING) {
75 IDirectManipulationContent*
content;
76 HRESULT hr = viewport->GetPrimaryContent(IID_PPV_ARGS(&
content));
79 hr =
content->GetContentTransform(transform, ARRAYSIZE(transform));
81 initial_gesture_data_ = ConvertToGestureData(transform);
83 FML_LOG(ERROR) <<
"GetContentTransform failed";
86 FML_LOG(ERROR) <<
"GetPrimaryContent failed";
91 }
else if (previous == DIRECTMANIPULATION_RUNNING) {
93 last_pan_delta_x_ = 0.0;
94 last_pan_delta_y_ = 0.0;
98 }
else if (previous == DIRECTMANIPULATION_INERTIA) {
100 (std::max)(std::abs(last_pan_delta_x_), std::abs(last_pan_delta_y_)) >
108 during_synthesized_reset_ =
true;
111 last_pan_delta_x_ = 0.0;
112 last_pan_delta_y_ = 0.0;
114 HRESULT hr = viewport->GetViewportRect(&rect);
116 FML_LOG(ERROR) <<
"Failed to get the current viewport rect";
119 hr = viewport->ZoomToRect(rect.left, rect.top, rect.right, rect.bottom,
122 FML_LOG(ERROR) <<
"Failed to reset the gesture using ZoomToRect";
virtual void OnPointerPanZoomStart(int32_t device_id)=0
virtual void OnPointerPanZoomEnd(int32_t device_id)=0
virtual void OnScrollInertiaCancel(int32_t device_id)=0
References flutter::DirectManipulationOwner::binding_handler_delegate, content, flutter::WindowBindingHandlerDelegate::OnPointerPanZoomEnd(), flutter::WindowBindingHandlerDelegate::OnPointerPanZoomStart(), and flutter::WindowBindingHandlerDelegate::OnScrollInertiaCancel().
◆ OnViewportUpdated()
| HRESULT flutter::DirectManipulationEventHandler::OnViewportUpdated |
( |
IDirectManipulationViewport * |
viewport | ) |
|
|
override |
◆ QueryInterface()
| STDMETHODIMP flutter::DirectManipulationEventHandler::QueryInterface |
( |
REFIID |
iid, |
|
|
void ** |
ppv |
|
) |
| |
|
override |
Definition at line 34 of file direct_manipulation.cc.
36 if ((iid == IID_IUnknown) ||
37 (iid == IID_IDirectManipulationViewportEventHandler)) {
38 *ppv =
static_cast<IDirectManipulationViewportEventHandler*
>(
this);
41 }
else if (iid == IID_IDirectManipulationInteractionEventHandler) {
42 *ppv =
static_cast<IDirectManipulationInteractionEventHandler*
>(
this);
ULONG STDMETHODCALLTYPE AddRef() override
References AddRef().
◆ Release()
| ULONG STDMETHODCALLTYPE flutter::DirectManipulationEventHandler::Release |
( |
| ) |
|
|
override |
◆ DirectManipulationOwner
The documentation for this class was generated from the following files: