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

26 lines
618 B
C++

#pragma once
#include <Tactility/hal/Keyboard.h>
#include <Tactility/TactilityCore.h>
class SdlKeyboard : public tt::hal::Keyboard {
private:
lv_indev_t* _Nullable handle = nullptr;
public:
bool start(lv_display_t* display) override {
handle = lv_sdl_keyboard_create();
return handle != nullptr;
}
bool stop() override { tt_crash("Not supported"); }
bool isAttached() const override { return true; }
lv_indev_t* _Nullable getLvglIndev() override { return handle; }
};
tt::hal::Keyboard* createKeyboard() {
return static_cast<tt::hal::Keyboard*>(new SdlKeyboard());
}