typedef enum {
MyAppSceneMain,
} MyAppScene;
void main_scene_on_enter(void* context) {
UNUSED(context);
}
void main_scene_on_exit(void* context) {
UNUSED(context);
}
bool main_scene_on_event(void* context, SceneManagerEvent event) {
UNUSED(context);
UNUSED(event);
return false;
}
void (*const app_scene_on_enter_handlers[])(void*) = {
main_scene_on_enter,
};
void (*const app_scene_on_exit_handlers[])(void*) = {
main_scene_on_exit,
};
bool (*const app_scene_on_event_handlers[])(void*, SceneManagerEvent) = {
main_scene_on_event,
};
const SceneManagerHandlers app_scene_event_handlers = {
.on_enter_handlers = app_scene_on_enter_handlers,
.on_exit_handlers = app_scene_on_exit_handlers,
.on_event_handlers = app_scene_on_event_handlers,
.scene_num = 1,
};
int32_t my_first_app_app(void* p) {
UNUSED(p);
Gui* gui = furi_record_open(RECORD_GUI);
App* app = app_alloc();
view_dispatcher_attach_to_gui(app->view_dispatcher, gui, ViewDispatcherTypeFullscreen);
// HERE
scene_manager_next_scene(app->scene_manager, MyAppSceneMain);
view_dispatcher_run(app->view_dispatcher);
app_free(app);
furi_record_close(RECORD_GUI);
return 0;
}
https://gist.github.com/blluv/3d35d53670c8966225f1fbff903c505d