1#include "../../js_modules.h"
32 JsViewPropAssign assign;
38typedef void* (*JsViewAlloc)(void);
40typedef View* (*JsViewGetView)(
void* specific_view);
42typedef void (*JsViewFree)(
void* specific_view);
47typedef void* (*JsViewCustomMake)(
struct mjs*
mjs,
void* specific_view, mjs_val_t view_obj);
49typedef void (*JsViewCustomDestroy)(
void* specific_view,
void* custom_state,
FuriEventLoop* loop);
64 JsViewGetView get_view;
66 JsViewCustomMake custom_make;
67 JsViewCustomDestroy custom_destroy;
93#define JS_GUI_VIEW_DEF(name, descriptor) \
94 static void* view_mod_ctor(struct mjs* mjs, mjs_val_t* object, JsModules* modules) { \
96 *object = js_gui_make_view_factory(mjs, descriptor); \
99 static const JsModuleDescriptor js_mod_desc = { \
105 static const FlipperAppPluginDescriptor plugin_descriptor = { \
106 .appid = PLUGIN_APP_ID, \
107 .ep_api_version = PLUGIN_API_VERSION, \
108 .entry_point = &js_mod_desc, \
110 const FlipperAppPluginDescriptor* js_view_##name##_ep(void) { \
111 return &plugin_descriptor; \
Definition event_loop_i.h:79
Descriptor for a JS view.
Definition js_gui.h:62
Property descriptor.
Definition js_gui.h:29