Loading...
Searching...
No Matches
js_event_loop.h
Go to the documentation of this file.
1#include "../../js_modules.h" // IWYU pragma: keep
4
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31typedef struct JsEventLoop JsEventLoop;
32
33typedef enum {
34 JsEventLoopObjectTypeTimer,
35 JsEventLoopObjectTypeQueue,
36 JsEventLoopObjectTypeMutex,
37 JsEventLoopObjectTypeSemaphore,
38 JsEventLoopObjectTypeStream,
39} JsEventLoopObjectType;
40
41typedef mjs_val_t (
42 *JsEventLoopTransformer)(struct mjs* mjs, FuriEventLoopObject* object, void* context);
43
44typedef struct {
46 JsEventLoopTransformer transformer;
47 void* transformer_context;
49
50typedef struct {
52 uint32_t interval_ticks;
54
79typedef struct {
80 JsForeignMagic magic; // <! `JsForeignMagic_JsEventLoopContract`
81 JsEventLoopObjectType object_type;
82 FuriEventLoopObject* object;
83 union {
86 };
88
89static_assert(offsetof(JsEventLoopContract, magic) == 0);
90
101
102#ifdef __cplusplus
103}
104#endif
Furi Event Loop.
FuriEventLoopEvent
Enumeration of event types, flags and masks.
Definition event_loop.h:32
Software timer functionality for FuriEventLoop.
FuriEventLoopTimerType
Enumeration of possible timer types.
Definition event_loop_timer.h:17
FuriEventLoop * js_event_loop_get_loop(JsEventLoop *loop)
Gets the FuriEventLoop owned by a JsEventLoop.
Definition js_event_loop.c:447
Definition event_loop_i.h:79
Adapter for other JS modules that wish to integrate with the event loop JS module.
Definition js_event_loop.h:79
Per-module instance control structure.
Definition js_event_loop.c:50
Definition js_event_loop.h:44
Definition js_event_loop.h:50
Definition mjs_core.h:63