FabGL
ESP32 Display Controller and Graphics Library

◆ getNextPacket()

bool getNextPacket ( MousePacket packet,
int  timeOutMS = -1,
bool  requestResendOnTimeOut = false 
)

Gets a mouse raw movement (packet) from the queue.

Parameters
packetPointer to MousePacket structure to be filled with mouse movement.
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 packet structure has been filled. False when there is no data in the queue.

Example:

MousePacket mousePacket;
Mouse.getNextPacket(&mousePacket);

Definition at line 134 of file mouse.cpp.