Tactiliest/Tactility/Source/lvgl/LvglKeypad.cpp
Ken Van Hoeylandt c87200a80d
Project restructuring (fixes macOS builds) (#198)
- Create `Include/` folder for all main projects
- Fix some issues here and there (found while moving things)
- All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
2025-02-01 18:13:20 +01:00

28 lines
541 B
C++

#include "Tactility/lvgl/LvglKeypad.h"
namespace tt::lvgl {
static lv_indev_t* keyboard_device = nullptr;
bool keypad_is_available() {
return keyboard_device != nullptr;
}
void keypad_set_indev(lv_indev_t* device) {
keyboard_device = device;
}
void keypad_activate(lv_group_t* group) {
if (keyboard_device != nullptr) {
lv_indev_set_group(keyboard_device, group);
}
}
void keypad_deactivate() {
if (keyboard_device != nullptr) {
lv_indev_set_group(keyboard_device, nullptr);
}
}
} // namespace