7#include "TinyGPU/Input/TouchDriverCommon.h"
12
13
14
15
16
17
18
19
20
21
22
23
24
30 SDL_InitSubSystem(SDL_INIT_VIDEO);
36 while (SDL_PollEvent(&event)) {
37 if (event.type == SDL_QUIT) {
44 const uint32_t buttons = SDL_GetMouseState(&x, &y);
45 lastX_ =
static_cast<int16_t>(x);
46 lastY_ =
static_cast<int16_t>(y);
47 down_ = (buttons & SDL_BUTTON(SDL_BUTTON_LEFT)) != 0;
52 if (!down_)
return false;
Maps the desktop mouse to a TouchDriver, for exercising touch-driven UI (buttons, sliders,...
Definition: TouchDriverSDL.h:25
bool isTouched() override
Return whether the panel currently appears touched.
Definition: TouchDriverSDL.h:34
bool getPoint(Point &outPoint) override
Read the current touch point.
Definition: TouchDriverSDL.h:51
bool begin() override
Initialize the controller.
Definition: TouchDriverSDL.h:29
Base class for touch controllers.
Definition: TouchDriverCommon.h:72
Point mapCoordinates(int16_t rawX, int16_t rawY, uint16_t pressure=255) const
Convert raw controller coordinates into logical display space.
Definition: TouchDriverCommon.h:208
Definition: DSIBusESP32.h:19
Touch point.
Definition: TouchDriverCommon.h:32