Check if cursor has moved out of viewport bounds in CursorController

This CL updates CursorController to check if and which boundary the
cursor has crossed. This will be used to enable cursor moving between
different connected displays.

Test: presubmit and manual
Bug: 367660694
Flag: com.android.input.flags.connected_displays_cursor
Change-Id: Ib559e0d72364f446269e73cfa1671ee9d2f715ac
diff --git a/libs/input/MouseCursorController.h b/libs/input/MouseCursorController.h
index 12b31a8..10f0d76 100644
--- a/libs/input/MouseCursorController.h
+++ b/libs/input/MouseCursorController.h
@@ -20,9 +20,6 @@
 #include <gui/DisplayEventReceiver.h>
 #include <input/DisplayViewport.h>
 #include <input/Input.h>
-#include <utils/BitSet.h>
-#include <utils/Looper.h>
-#include <utils/RefBase.h>
 
 #include <functional>
 #include <map>
@@ -43,7 +40,8 @@
     MouseCursorController(PointerControllerContext& context);
     ~MouseCursorController();
 
-    void move(float deltaX, float deltaY);
+    // Move the pointer and return unconsumed delta
+    vec2 move(float deltaX, float deltaY);
     void setPosition(float x, float y);
     FloatPoint getPosition() const;
     ui::LogicalDisplayId getDisplayId() const;
@@ -113,6 +111,7 @@
     bool doFadingAnimationLocked(nsecs_t timestamp);
 
     void startAnimationLocked();
+    FloatRect getBoundsLocked();
 };
 
 } // namespace android