1919#include < ftl/flags.h>
2020#include < gui/WindowInfo.h>
2121#include < gui/constants.h>
22- #include < input/InputTransport.h>
2322#include < ui/Transform.h>
2423#include < utils/BitSet.h>
2524#include < bitset>
25+ #include " Connection.h"
26+ #include " InputTargetFlags.h"
2627
2728namespace android ::inputdispatcher {
2829
@@ -33,29 +34,7 @@ namespace android::inputdispatcher {
3334 * window area.
3435 */
3536struct InputTarget {
36- enum class Flags : uint32_t {
37- /* This flag indicates that the event is being delivered to a foreground application. */
38- FOREGROUND = 1 << 0 ,
39-
40- /* This flag indicates that the MotionEvent falls within the area of the target
41- * obscured by another visible window above it. The motion event should be
42- * delivered with flag AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED. */
43- WINDOW_IS_OBSCURED = 1 << 1 ,
44-
45- /* This flag indicates that a motion event is being split across multiple windows. */
46- SPLIT = 1 << 2 ,
47-
48- /* This flag indicates that the pointer coordinates dispatched to the application
49- * will be zeroed out to avoid revealing information to an application. This is
50- * used in conjunction with FLAG_DISPATCH_AS_OUTSIDE to prevent apps not sharing
51- * the same UID from watching all touches. */
52- ZERO_COORDS = 1 << 3 ,
53-
54- /* This flag indicates that the target of a MotionEvent is partly or wholly
55- * obscured by another visible window above it. The motion event should be
56- * delivered with flag AMOTION_EVENT_FLAG_WINDOW_IS_PARTIALLY_OBSCURED. */
57- WINDOW_IS_PARTIALLY_OBSCURED = 1 << 14 ,
58- };
37+ using Flags = InputTargetFlags;
5938
6039 enum class DispatchMode {
6140 /* This flag indicates that the event should be sent as is.
@@ -85,8 +64,8 @@ struct InputTarget {
8564 ftl_last = SLIPPERY_ENTER,
8665 };
8766
88- // The input channel to be targeted.
89- std::shared_ptr<InputChannel> inputChannel ;
67+ // The input connection to be targeted.
68+ std::shared_ptr<Connection> connection ;
9069
9170 // Flags for the input target.
9271 ftl::Flags<Flags> flags;
0 commit comments