Loading...
Searching...
No Matches
view_dispatcher_i.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <m-dict.h>
9
10#include "view_dispatcher.h"
11#include "view_i.h"
12#include "gui_i.h"
13
14DICT_DEF2(ViewDict, uint32_t, M_DEFAULT_OPLIST, View*, M_PTR_OPLIST) // NOLINT
15
17 bool is_event_loop_owned;
18 FuriEventLoop* event_loop;
19 FuriMessageQueue* input_queue;
20 FuriMessageQueue* event_queue;
21
22 Gui* gui;
23 ViewPort* view_port;
24 ViewDict_t views;
25
26 View* current_view;
27
28 View* ongoing_input_view;
29 uint8_t ongoing_input;
30
31 ViewDispatcherCustomEventCallback custom_event_callback;
32 ViewDispatcherNavigationEventCallback navigation_event_callback;
33 ViewDispatcherTickEventCallback tick_event_callback;
34 uint32_t tick_period;
35 void* event_context;
36};
37
39void view_dispatcher_draw_callback(Canvas* canvas, void* context);
40
42void view_dispatcher_input_callback(InputEvent* event, void* context);
43
45void view_dispatcher_handle_input(ViewDispatcher* view_dispatcher, InputEvent* event);
46
48void view_dispatcher_handle_tick_event(void* context);
49
51void view_dispatcher_handle_custom_event(ViewDispatcher* view_dispatcher, uint32_t event);
52
54void view_dispatcher_set_current_view(ViewDispatcher* view_dispatcher, View* view);
55
57void view_dispatcher_update(View* view, void* context);
58
60void view_dispatcher_run_event_callback(FuriEventLoopObject* object, void* context);
61
63void view_dispatcher_run_input_callback(FuriEventLoopObject* object, void* context);
GUI: main API internals.
Canvas structure.
Definition canvas_i.h:40
Definition event_loop_i.h:78
Definition message_queue.c:16
Gui structure.
Definition gui_i.h:47
Input Event, dispatches with FuriPubSub.
Definition input.h:31
Definition view_dispatcher_i.h:16
Definition view_i.h:16
Definition view_port_i.h:11
GUI: ViewDispatcher API.
bool(* ViewDispatcherNavigationEventCallback)(void *context)
Prototype for navigation event callback.
Definition view_dispatcher.h:39
bool(* ViewDispatcherCustomEventCallback)(void *context, uint32_t event)
Prototype for custom event callback.
Definition view_dispatcher.h:36
void(* ViewDispatcherTickEventCallback)(void *context)
Prototype for tick event callback.
Definition view_dispatcher.h:42
void view_dispatcher_input_callback(InputEvent *event, void *context)
ViewPort Input Callback.
Definition view_dispatcher.c:245
void view_dispatcher_run_input_callback(FuriEventLoopObject *object, void *context)
ViewDispatcher run event loop input callback.
Definition view_dispatcher.c:389
void view_dispatcher_handle_tick_event(void *context)
Tick handler.
Definition view_dispatcher.c:309
void view_dispatcher_handle_input(ViewDispatcher *view_dispatcher, InputEvent *event)
Input handler.
Definition view_dispatcher.c:252
void view_dispatcher_run_event_callback(FuriEventLoopObject *object, void *context)
ViewDispatcher run event loop event callback.
Definition view_dispatcher.c:379
void view_dispatcher_handle_custom_event(ViewDispatcher *view_dispatcher, uint32_t event)
Custom event handler.
Definition view_dispatcher.c:316
void view_dispatcher_draw_callback(Canvas *canvas, void *context)
ViewPort Draw Callback.
Definition view_dispatcher.c:238
void view_dispatcher_update(View *view, void *context)
ViewDispatcher update event.
Definition view_dispatcher.c:368
void view_dispatcher_set_current_view(ViewDispatcher *view_dispatcher, View *view)
Set current view, dispatches view enter and exit.
Definition view_dispatcher.c:342
GUI: internal View API.