Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter_runner::testing::FakeTouchSource Class Reference

#include <touch_source.h>

Inheritance diagram for flutter_runner::testing::FakeTouchSource:

Public Member Functions

void Watch (std::vector< fuchsia::ui::pointer::TouchResponse > responses, TouchSource::WatchCallback callback) override
 
void ScheduleCallback (std::vector< fuchsia::ui::pointer::TouchEvent > events)
 
std::optional< std::vector< fuchsia::ui::pointer::TouchResponse > > UploadedResponses ()
 

Detailed Description

Definition at line 19 of file touch_source.h.

Member Function Documentation

◆ ScheduleCallback()

void flutter_runner::testing::FakeTouchSource::ScheduleCallback ( std::vector< fuchsia::ui::pointer::TouchEvent >  events)
inline

Definition at line 29 of file touch_source.h.

29 {
30 FML_CHECK(callback_) << "require a valid WatchCallback";
31 callback_(std::move(events));
32 }
#define FML_CHECK(condition)
Definition: logging.h:85

◆ UploadedResponses()

std::optional< std::vector< fuchsia::ui::pointer::TouchResponse > > flutter_runner::testing::FakeTouchSource::UploadedResponses ( )
inline

Definition at line 36 of file touch_source.h.

36 {
37 auto responses = std::move(responses_);
38 responses_.reset();
39 return responses;
40 }

◆ Watch()

void flutter_runner::testing::FakeTouchSource::Watch ( std::vector< fuchsia::ui::pointer::TouchResponse >  responses,
TouchSource::WatchCallback  callback 
)
inlineoverride

Definition at line 22 of file touch_source.h.

23 {
24 responses_ = std::move(responses);
25 callback_ = std::move(callback);
26 }
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback

The documentation for this class was generated from the following file: