Files
tactility/Tactility/Source/app/App.cpp
T
Ken Van Hoeylandt 9f721e6655 Refactor LVGL code into kernel module (#472)
* **New Features**
  * Added a standalone LVGL module and enabled LVGL support in the simulator for richer local UI testing.

* **Refactor**
  * HAL and LVGL split into distinct modules; startup and device attach/detach flows reorganized for clearer lifecycle management.
  * Public APIs tightened with clearer nullability/documentation.

* **Bug Fixes**
  * More consistent LVGL start/stop and device attach/detach behavior for improved stability.
2026-02-01 22:57:45 +01:00

50 lines
1.3 KiB
C++

#include <Tactility/app/App.h>
#include <Tactility/service/loader/Loader.h>
namespace tt::app {
constexpr auto* TAG = "App";
LaunchId start(const std::string& id, std::shared_ptr<const Bundle> parameters) {
const auto service = service::loader::findLoaderService();
assert(service != nullptr);
return service->start(id, std::move(parameters));
}
void stop() {
const auto service = service::loader::findLoaderService();
assert(service != nullptr);
service->stopTop();
}
void stop(const std::string& id) {
const auto service = service::loader::findLoaderService();
assert(service != nullptr);
service->stopTop(id);
}
void stopAll(const std::string& id) {
const auto service = service::loader::findLoaderService();
assert(service != nullptr);
service->stopAll(id);
}
bool isRunning(const std::string& id) {
const auto service = service::loader::findLoaderService();
assert(service != nullptr);
return service->isRunning(id);
}
std::shared_ptr<AppContext> getCurrentAppContext() {
const auto service = service::loader::findLoaderService();
assert(service != nullptr);
return service->getCurrentAppContext();
}
std::shared_ptr<App> getCurrentApp() {
const auto app_context = getCurrentAppContext();
return (app_context != nullptr) ? app_context->getApp() : nullptr;
}
}