mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-19 03:13:14 +00:00
31 lines
569 B
C++
31 lines
569 B
C++
#include <tt_app.h>
|
|
#include "Calculator.h"
|
|
|
|
static void onShow(AppHandle appHandle, void* data, lv_obj_t* parent) {
|
|
static_cast<Calculator*>(data)->onShow(appHandle, parent);
|
|
}
|
|
|
|
static void* createApp() {
|
|
return new Calculator();
|
|
}
|
|
|
|
static void destroyApp(void* app) {
|
|
delete static_cast<Calculator*>(app);
|
|
}
|
|
|
|
ExternalAppManifest manifest = {
|
|
.name = "Hello World",
|
|
.createData = createApp,
|
|
.destroyData = destroyApp,
|
|
.onShow = onShow,
|
|
};
|
|
|
|
extern "C" {
|
|
|
|
int main(int argc, char* argv[]) {
|
|
tt_app_register(&manifest);
|
|
return 0;
|
|
}
|
|
|
|
}
|