mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
* Add signal API * Add signal support to loader * Add signal support to ViewDispatcher * Remove extra signal definitions * Fix typos Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com> * scripts: runfap: close current app pre-launch * loader: enable backlight when starting an app * scripts: removed distfap.py * Do not expose signal API via ViewDispatcher * scripts: runfap: iterative retry to launch * Add a loader signal subcommand * Furi, Gui: move signal handling from View Dispatcher to Event Loop Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
36 lines
827 B
C
36 lines
827 B
C
#pragma once
|
|
|
|
#include "event_loop.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct FuriEventLoopItem FuriEventLoopItem;
|
|
|
|
/* Link between Event Loop */
|
|
|
|
typedef struct {
|
|
FuriEventLoopItem* item_in;
|
|
FuriEventLoopItem* item_out;
|
|
} FuriEventLoopLink;
|
|
|
|
void furi_event_loop_link_notify(FuriEventLoopLink* instance, FuriEventLoopEvent event);
|
|
|
|
/* Contract between event loop and an object */
|
|
|
|
typedef FuriEventLoopLink* (*FuriEventLoopContractGetLink)(void* object);
|
|
|
|
typedef uint32_t (*FuriEventLoopContractGetLevel)(void* object, FuriEventLoopEvent event);
|
|
|
|
typedef struct {
|
|
const FuriEventLoopContractGetLink get_link;
|
|
const FuriEventLoopContractGetLevel get_level;
|
|
} FuriEventLoopContract;
|
|
|
|
bool furi_event_loop_signal_callback(uint32_t signal, void* arg, void* context);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|