1#include "../../js_modules.h"
12 JsViewPropTypeTypedArr,
35 JsViewPropAssign assign;
41typedef void* (*JsViewAlloc)(void);
43typedef View* (*JsViewGetView)(
void* specific_view);
45typedef void (*JsViewFree)(
void* specific_view);
50typedef void* (*JsViewCustomMake)(
struct mjs*
mjs,
void* specific_view, mjs_val_t view_obj);
52typedef void (*JsViewCustomDestroy)(
void* specific_view,
void* custom_state,
FuriEventLoop* loop);
67 JsViewGetView get_view;
69 JsViewCustomMake custom_make;
70 JsViewCustomDestroy custom_destroy;
96#define JS_GUI_VIEW_DEF(name, descriptor) \
97 static void* view_mod_ctor(struct mjs* mjs, mjs_val_t* object, JsModules* modules) { \
99 *object = js_gui_make_view_factory(mjs, descriptor); \
102 static const JsModuleDescriptor js_mod_desc = { \
108 static const FlipperAppPluginDescriptor plugin_descriptor = { \
109 .appid = PLUGIN_APP_ID, \
110 .ep_api_version = PLUGIN_API_VERSION, \
111 .entry_point = &js_mod_desc, \
113 const FlipperAppPluginDescriptor* js_view_##name##_ep(void) { \
114 return &plugin_descriptor; \
Definition event_loop_i.h:78
Descriptor for a JS view.
Definition js_gui.h:65
Property descriptor.
Definition js_gui.h:32