| 14 | #define HANDLE_AS_APP_CONTEXT(handle) ((tt::app::AppContext*)(handle)) |
| 15 | |
| 16 | void tt_app_register( |
| 17 | const AppRegistration appRegistration |
| 18 | ) { |
| 19 | #ifdef ESP_PLATFORM |
| 20 | assert((appRegistration.createData == nullptr) == (appRegistration.destroyData == nullptr)); |
| 21 | tt::app::setElfAppParameters( |
| 22 | appRegistration.createData, |
| 23 | appRegistration.destroyData, |
| 24 | appRegistration.onCreate, |
| 25 | appRegistration.onDestroy, |
| 26 | appRegistration.onShow, |
| 27 | appRegistration.onHide, |
| 28 | reinterpret_cast<tt::app::OnResult>(appRegistration.onResult) |
| 29 | ); |
| 30 | #else |
| 31 | check(false, "TactilityC is not intended for PC/Simulator"); |
| 32 | #endif |
| 33 | } |
| 34 | |
| 35 | BundleHandle tt_app_get_parameters(AppHandle handle) { |
| 36 | return (BundleHandle)HANDLE_AS_APP_CONTEXT(handle)->getParameters().get(); |
no test coverage detected