FabGL
ESP32 Display Controller and Graphics Library

◆ getNextDelta()

bool getNextDelta ( MouseDelta delta,
int  timeOutMS = -1,
bool  requestResendOnTimeOut = false 
)

Gets a mouse movement from the queue.

Parameters
deltaPointer to MouseDelta structure to be filled with mouse movement. May be nullptr if not required (in this case only Status().buttons is updated.
timeOutMSTimeout in milliseconds. -1 means no timeout (infinite time).
requestResendOnTimeOutIf true and timeout has expired then asks the mouse to resend the mouse movement.
Returns
True if the mouse movement structure has been filled. False when there is no data in the queue.

Example:

MouseDelta mouseDelta;
Mouse.getNextDelta(&mouseDelta);

Definition at line 119 of file mouse.cpp.