Support for touch/key events in LUA widgets

This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent 93797a3e14
commit a3424d5bc0
21 changed files with 965 additions and 753 deletions
+12 -15
View File
@@ -61,9 +61,6 @@ extern lua_State * lsScripts;
extern bool luaLcdAllowed;
#define EVENT_BUFFER_SIZE 4
extern event_t events[EVENT_BUFFER_SIZE];
#if defined(COLORLCD)
extern lua_State * lsWidgets;
extern uint32_t luaExtraMemoryUsage;
@@ -251,19 +248,19 @@ inline bool isLuaStandaloneRunning() {
return scriptInternalData[0].reference == SCRIPT_STANDALONE;
}
#if defined(HARDWARE_TOUCH)
struct LuaTouchData {
coord_t touchX;
coord_t touchY;
coord_t startX;
coord_t startY;
coord_t slideX;
coord_t slideY;
short tapCount;
};
// #if defined(HARDWARE_TOUCH)
// struct LuaTouchData {
// coord_t touchX;
// coord_t touchY;
// coord_t startX;
// coord_t startY;
// coord_t slideX;
// coord_t slideY;
// short tapCount;
// };
extern LuaTouchData touches[EVENT_BUFFER_SIZE];
#endif
// extern LuaTouchData touches[EVENT_BUFFER_SIZE];
// #endif
#else // defined(LUA)