mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-14 16:57:22 +00:00
e3ca293eee
* 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>
62 lines
1.3 KiB
C
62 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;
|