#pragma once #include #include #include "loader.h" #include "loader_menu.h" typedef struct { char* args; char* name; FuriThread* thread; bool insomniac; } LoaderAppData; struct Loader { FuriPubSub* pubsub; FuriMessageQueue* queue; LoaderMenu* loader_menu; LoaderAppData app; }; typedef enum { LoaderMessageTypeStartByName, LoaderMessageTypeAppClosed, LoaderMessageTypeShowMenu, LoaderMessageTypeMenuClosed, LoaderMessageTypeLock, LoaderMessageTypeUnlock, LoaderMessageTypeIsLocked, } LoaderMessageType; typedef struct { const char* name; const char* args; } LoaderMessageStartByName; typedef struct { LoaderStatus value; } LoaderMessageLoaderStatusResult; typedef struct { bool value; } LoaderMessageBoolResult; typedef struct { FuriApiLock api_lock; LoaderMessageType type; union { LoaderMessageStartByName start; }; union { LoaderMessageLoaderStatusResult* status_value; LoaderMessageBoolResult* bool_value; }; } LoaderMessage;