C++ conversion (#80)

Converted project to C++
This commit is contained in:
Ken Van Hoeylandt
2024-11-22 20:26:08 +01:00
committed by GitHub
parent 6d80144e12
commit 85e26636a3
488 changed files with 6017 additions and 39466 deletions
+27
View File
@@ -0,0 +1,27 @@
#include "LvglKeypad.h"
namespace tt::lvgl {
static lv_indev_t* keyboard_device = NULL;
bool keypad_is_available() {
return keyboard_device != NULL;
}
void keypad_set_indev(lv_indev_t* device) {
keyboard_device = device;
}
void keypad_activate(lv_group_t* group) {
if (keyboard_device != NULL) {
lv_indev_set_group(keyboard_device, group);
}
}
void keypad_deactivate() {
if (keyboard_device != NULL) {
lv_indev_set_group(keyboard_device, NULL);
}
}
} // namespace