unleashed-firmware/applications/services/loader/loader_i.h
WillyJL e3ca293eee
Desktop/Loader: Unload animations before loading FAPs (#3573)
* Desktop: Unload animations before FAP is loaded
* Loader: Add API to start detached (returns instantly, queues event)
* Desktop: Fix early animation unload deadlocks
* Loader: remove redundant event
* Bump api symbols

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
2024-04-09 22:42:03 +09:00

63 lines
1.3 KiB
C

#pragma once
#include <furi.h>
#include <toolbox/api_lock.h>
#include <flipper_application/flipper_application.h>
#include "loader.h"
#include "loader_menu.h"
#include "loader_applications.h"
typedef struct {
char* args;
FuriThread* thread;
bool insomniac;
FlipperApplication* fap;
} LoaderAppData;
struct Loader {
FuriPubSub* pubsub;
FuriMessageQueue* queue;
LoaderMenu* loader_menu;
LoaderApplications* loader_applications;
LoaderAppData app;
};
typedef enum {
LoaderMessageTypeStartByName,
LoaderMessageTypeAppClosed,
LoaderMessageTypeShowMenu,
LoaderMessageTypeMenuClosed,
LoaderMessageTypeApplicationsClosed,
LoaderMessageTypeLock,
LoaderMessageTypeUnlock,
LoaderMessageTypeIsLocked,
LoaderMessageTypeStartByNameDetachedWithGuiError,
} LoaderMessageType;
typedef struct {
const char* name;
const char* args;
FuriString* error_message;
} 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;