This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +28
-28
lines changed Expand file tree Collapse file tree 2 files changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,34 @@ static constexpr size_t kPlatformTaskRunnerIdentifier = 1;
3232static constexpr int32_t kMousePointerDeviceId = 0 ;
3333static constexpr int32_t kPointerPanZoomDeviceId = 1 ;
3434
35+ // Struct holding the state of an individual pointer. The engine doesn't keep
36+ // track of which buttons have been pressed, so it's the embedding's
37+ // responsibility.
38+ struct PointerState {
39+ // The device kind.
40+ FlutterPointerDeviceKind device_kind = kFlutterPointerDeviceKindMouse ;
41+
42+ // A virtual pointer ID that is unique across all device kinds.
43+ int32_t pointer_id = 0 ;
44+
45+ // True if the last event sent to Flutter had at least one button pressed.
46+ bool flutter_state_is_down = false ;
47+
48+ // True if kAdd has been sent to Flutter. Used to determine whether
49+ // to send a kAdd event before sending an incoming pointer event, since
50+ // Flutter expects pointers to be added before events are sent for them.
51+ bool flutter_state_is_added = false ;
52+
53+ // The currently pressed buttons, as represented in FlutterPointerEvent.
54+ uint64_t buttons = 0 ;
55+
56+ // The x position where the last pan/zoom started.
57+ double pan_zoom_start_x = 0 ;
58+
59+ // The y position where the last pan/zoom started.
60+ double pan_zoom_start_y = 0 ;
61+ };
62+
3563struct _FlEngine {
3664 GObject parent_instance;
3765
Original file line number Diff line number Diff line change @@ -26,34 +26,6 @@ typedef enum {
2626 // NOLINTEND(readability-identifier-naming)
2727} FlEngineError ;
2828
29- // Struct holding the state of an individual pointer. The engine doesn't keep
30- // track of which buttons have been pressed, so it's the embedding's
31- // responsibility.
32- struct PointerState {
33- // The device kind.
34- FlutterPointerDeviceKind device_kind = kFlutterPointerDeviceKindMouse ;
35-
36- // A virtual pointer ID that is unique across all device kinds.
37- int32_t pointer_id = 0 ;
38-
39- // True if the last event sent to Flutter had at least one button pressed.
40- bool flutter_state_is_down = false;
41-
42- // True if kAdd has been sent to Flutter. Used to determine whether
43- // to send a kAdd event before sending an incoming pointer event, since
44- // Flutter expects pointers to be added before events are sent for them.
45- bool flutter_state_is_added = false;
46-
47- // The currently pressed buttons, as represented in FlutterPointerEvent.
48- uint64_t buttons = 0 ;
49-
50- // The x position where the last pan/zoom started.
51- double pan_zoom_start_x = 0 ;
52-
53- // The y position where the last pan/zoom started.
54- double pan_zoom_start_y = 0 ;
55- };
56-
5729GQuark fl_engine_error_quark (void ) G_GNUC_CONST ;
5830
5931/**
You can’t perform that action at this time.
0 commit comments