Flipper Zero Firmware
Loading...
Searching...
No Matches
view_i.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "view.h"
9#include <furi.h>
10
11typedef struct {
12 FuriMutex* mutex;
13 uint8_t data[];
15
16struct View {
17 ViewDrawCallback draw_callback;
18 ViewInputCallback input_callback;
19 ViewCustomCallback custom_callback;
20
21 ViewModelType model_type;
22 ViewNavigationCallback previous_callback;
23 ViewCallback enter_callback;
24 ViewCallback exit_callback;
25 ViewOrientation orientation;
26
27 ViewUpdateCallback update_callback;
28 void* update_callback_context;
29
30 void* model;
31 void* context;
32};
33
35void view_icon_animation_callback(IconAnimation* instance, void* context);
36
38void view_unlock_model(View* view);
39
41void view_draw(View* view, Canvas* canvas);
42
44bool view_input(View* view, InputEvent* event);
45
47bool view_custom(View* view, uint32_t event);
48
50uint32_t view_previous(View* view);
51
53void view_enter(View* view);
54
56void view_exit(View* view);
Canvas structure.
Definition canvas_i.h:40
Definition mutex.c:11
Definition icon_animation_i.h:12
Input Event, dispatches with FuriPubSub.
Definition input.h:31
Definition view_i.h:16
Definition view_i.h:11
GUI: View API.
void(* ViewDrawCallback)(Canvas *canvas, void *model)
View Draw callback.
Definition view.h:41
void(* ViewCallback)(void *context)
View callback.
Definition view.h:69
bool(* ViewCustomCallback)(uint32_t event, void *context)
View Custom callback.
Definition view.h:56
bool(* ViewInputCallback)(InputEvent *event, void *context)
View Input callback.
Definition view.h:49
void(* ViewUpdateCallback)(View *view, void *context)
View Update Callback Called upon model change, need to be propagated to GUI throw ViewPort update.
Definition view.h:77
uint32_t(* ViewNavigationCallback)(void *context)
View navigation callback.
Definition view.h:63
ViewModelType
View model types.
Definition view.h:80
bool view_input(View *view, InputEvent *event)
Input Callback for View dispatcher.
Definition view.c:144
void view_unlock_model(View *view)
Unlock model.
Definition view.c:127
void view_enter(View *view)
Enter Callback for View dispatcher.
Definition view.c:171
void view_icon_animation_callback(IconAnimation *instance, void *context)
IconAnimation tie callback.
Definition view.c:118
void view_exit(View *view)
Exit Callback for View dispatcher.
Definition view.c:176
void view_draw(View *view, Canvas *canvas)
Draw Callback for View dispatcher.
Definition view.c:135
uint32_t view_previous(View *view)
Previous Callback for View dispatcher.
Definition view.c:162
bool view_custom(View *view, uint32_t event)
Custom Callback for View dispatcher.
Definition view.c:153