5#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_TESTS_POINTER_EVENT_UTILITY_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_TESTS_POINTER_EVENT_UTILITY_H_
8#include <fuchsia/ui/pointer/cpp/fidl.h>
9#include <zircon/types.h>
24 fuchsia::ui::pointer::EventPhase phase,
25 std::array<float, 2> position);
27 std::array<std::array<float, 2>, 2> view,
28 std::array<std::array<float, 2>, 2> viewport,
31 fuchsia::ui::pointer::TouchInteractionResult
result);
33 fuchsia::ui::pointer::TouchEvent
Build();
34 std::vector<fuchsia::ui::pointer::TouchEvent>
BuildAsVector();
37 std::optional<zx_time_t> time_;
38 std::optional<fuchsia::ui::pointer::ViewParameters> params_;
39 std::optional<fuchsia::ui::pointer::TouchPointerSample> sample_;
40 std::optional<fuchsia::ui::pointer::TouchInteractionResult> result_;
50 std::array<float, 2> position,
51 std::vector<uint8_t> pressed_buttons,
52 std::array<int64_t, 2> scroll,
53 std::array<int64_t, 2> scroll_in_physical_pixel,
54 bool is_precision_scroll);
56 std::array<std::array<float, 2>, 2> view,
57 std::array<std::array<float, 2>, 2> viewport,
60 std::vector<uint8_t> buttons);
61 fuchsia::ui::pointer::MouseEvent
Build();
62 std::vector<fuchsia::ui::pointer::MouseEvent>
BuildAsVector();
65 std::optional<zx_time_t> time_;
66 std::optional<fuchsia::ui::pointer::MousePointerSample> sample_;
67 std::optional<fuchsia::ui::pointer::ViewParameters> params_;
68 std::optional<fuchsia::ui::pointer::MouseDeviceInfo> device_info_;
fuchsia::ui::pointer::MouseEvent Build()
MouseEventBuilder & AddSample(uint32_t id, std::array< float, 2 > position, std::vector< uint8_t > pressed_buttons, std::array< int64_t, 2 > scroll, std::array< int64_t, 2 > scroll_in_physical_pixel, bool is_precision_scroll)
static MouseEventBuilder New()
std::vector< fuchsia::ui::pointer::MouseEvent > BuildAsVector()
MouseEventBuilder & AddViewParameters(std::array< std::array< float, 2 >, 2 > view, std::array< std::array< float, 2 >, 2 > viewport, std::array< float, 9 > transform)
MouseEventBuilder & AddTime(zx_time_t time)
MouseEventBuilder & AddMouseDeviceInfo(uint32_t id, std::vector< uint8_t > buttons)
std::vector< fuchsia::ui::pointer::TouchEvent > BuildAsVector()
fuchsia::ui::pointer::TouchEvent Build()
TouchEventBuilder & AddViewParameters(std::array< std::array< float, 2 >, 2 > view, std::array< std::array< float, 2 >, 2 > viewport, std::array< float, 9 > transform)
TouchEventBuilder & AddSample(fuchsia::ui::pointer::TouchInteractionId id, fuchsia::ui::pointer::EventPhase phase, std::array< float, 2 > position)
static TouchEventBuilder New()
TouchEventBuilder & AddTime(zx_time_t time)
TouchEventBuilder & AddResult(fuchsia::ui::pointer::TouchInteractionResult result)
static double time(int loops, Benchmark *bench, Target *target)
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)