MCPcopy Create free account
hub / github.com/DroomOne/Flipper-Plugin-Tutorial / render_callback

Function render_callback

hello_world.c:21–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19} PluginState;
20
21static void render_callback(Canvas* const canvas, void* ctx) {
22 const PluginState* plugin_state = acquire_mutex((ValueMutex*)ctx, 25);
23 if(plugin_state == NULL) {
24 return;
25 }
26 // border around the edge of the screen
27 canvas_draw_frame(canvas, 0, 0, 128, 64);
28
29 canvas_set_font(canvas, FontPrimary);
30 canvas_draw_str_aligned(
31 canvas, plugin_state->x, plugin_state->y, AlignRight, AlignBottom, "Hello World!");
32
33 release_mutex((ValueMutex*)ctx, plugin_state);
34}
35
36static void input_callback(InputEvent* input_event, FuriMessageQueue* event_queue) {
37 furi_assert(event_queue);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected