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
@@ -0,0 +1,30 @@
#include "ScreenshotUi.h"
namespace tt::app::screenshot {
static void on_show(App app, lv_obj_t* parent) {
auto* ui = static_cast<ScreenshotUi*>(tt_app_get_data(app));
create_ui(app, ui, parent);
}
static void on_start(App app) {
auto* ui = static_cast<ScreenshotUi*>(malloc(sizeof(ScreenshotUi)));
tt_app_set_data(app, ui);
}
static void on_stop(App app) {
auto* ui = static_cast<ScreenshotUi*>(tt_app_get_data(app));
free(ui);
}
extern const AppManifest manifest = {
.id = "screenshot",
.name = "Screenshot",
.icon = LV_SYMBOL_IMAGE,
.type = AppTypeSystem,
.on_start = &on_start,
.on_stop = &on_stop,
.on_show = &on_show,
};
} // namespace