#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 |
◆ 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 64 of file direct_manipulation.cc.
68 if (during_synthesized_reset_) {
69 during_synthesized_reset_ = current != DIRECTMANIPULATION_READY;
72 during_inertia_ = current == DIRECTMANIPULATION_INERTIA;
73 if (current == DIRECTMANIPULATION_RUNNING) {
74 IDirectManipulationContent*
content;
75 HRESULT hr = viewport->GetPrimaryContent(IID_PPV_ARGS(&
content));
78 hr =
content->GetContentTransform(transform, ARRAYSIZE(transform));
80 initial_gesture_data_ = ConvertToGestureData(transform);
82 FML_LOG(ERROR) <<
"GetContentTransform failed";
85 FML_LOG(ERROR) <<
"GetPrimaryContent failed";
90 }
else if (previous == DIRECTMANIPULATION_RUNNING) {
92 last_pan_delta_x_ = 0.0;
93 last_pan_delta_y_ = 0.0;
97 }
else if (previous == DIRECTMANIPULATION_INERTIA) {
99 (std::max)(std::abs(last_pan_delta_x_), std::abs(last_pan_delta_y_)) >
107 during_synthesized_reset_ =
true;
110 last_pan_delta_x_ = 0.0;
111 last_pan_delta_y_ = 0.0;
113 HRESULT hr = viewport->GetViewportRect(&rect);
115 FML_LOG(ERROR) <<
"Failed to get the current viewport rect";
118 hr = viewport->ZoomToRect(rect.left, rect.top, rect.right, rect.bottom,
121 FML_LOG(ERROR) <<
"Failed to reset the gesture using ZoomToRect";
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 33 of file direct_manipulation.cc.
35 if ((iid == IID_IUnknown) ||
36 (iid == IID_IDirectManipulationViewportEventHandler)) {
37 *ppv =
static_cast<IDirectManipulationViewportEventHandler*
>(
this);
40 }
else if (iid == IID_IDirectManipulationInteractionEventHandler) {
41 *ppv =
static_cast<IDirectManipulationInteractionEventHandler*
>(
this);
References AddRef().
◆ Release()
ULONG STDMETHODCALLTYPE flutter::DirectManipulationEventHandler::Release |
( |
| ) |
|
|
override |
◆ DirectManipulationOwner
The documentation for this class was generated from the following files: