e1579d3cbd
- Update TactilitySDK to `0.6.0-SNAPSHOT10`: Refactor `tt_app_registration()` for the related changes - Fix for Diceware app hanging - Deleted unused `assets/` in HelloWorld app
28 lines
555 B
C++
28 lines
555 B
C++
#include <tt_app.h>
|
|
#include "Calculator.h"
|
|
|
|
static void onShowApp(AppHandle appHandle, void* data, lv_obj_t* parent) {
|
|
static_cast<Calculator*>(data)->onShow(appHandle, parent);
|
|
}
|
|
|
|
static void* createAppData() {
|
|
return new Calculator();
|
|
}
|
|
|
|
static void destroyAppData(void* app) {
|
|
delete static_cast<Calculator*>(app);
|
|
}
|
|
|
|
extern "C" {
|
|
|
|
int main(int argc, char* argv[]) {
|
|
tt_app_register((AppRegistration) {
|
|
.createData = createAppData,
|
|
.destroyData = destroyAppData,
|
|
.onShow = onShowApp,
|
|
});
|
|
return 0;
|
|
}
|
|
|
|
}
|