Flipper Zero Firmware
Loading...
Searching...
No Matches
view_holder.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <gui/view.h>
10#include <gui/gui.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct ViewHolder ViewHolder;
17
21typedef void (*FreeCallback)(void* free_context);
22
27typedef void (*BackCallback)(void* back_context);
28
34
39void view_holder_free(ViewHolder* view_holder);
40
47void view_holder_set_view(ViewHolder* view_holder, View* view);
48
57 ViewHolder* view_holder,
58 FreeCallback free_callback,
59 void* free_context);
60
68
69void view_holder_set_back_callback(
70 ViewHolder* view_holder,
71 BackCallback back_callback,
72 void* back_context);
73
80void view_holder_attach_to_gui(ViewHolder* view_holder, Gui* gui);
81
87void view_holder_start(ViewHolder* view_holder);
88
94void view_holder_stop(ViewHolder* view_holder);
95
101void view_holder_update(View* view, void* context);
102
103#ifdef __cplusplus
104}
105#endif
GUI: main API.
Gui structure.
Definition gui_i.h:47
Definition view_holder.c:6
Definition view_i.h:16
GUI: View API.
void view_holder_free(ViewHolder *view_holder)
Free ViewHolder and call Free callback.
Definition view_holder.c:34
void view_holder_update(View *view, void *context)
View Update Handler.
Definition view_holder.c:112
void(* BackCallback)(void *back_context)
Back callback type.
Definition view_holder.h:27
void view_holder_stop(ViewHolder *view_holder)
Disable view processing.
Definition view_holder.c:106
void(* FreeCallback)(void *free_context)
Free callback type.
Definition view_holder.h:21
void view_holder_start(ViewHolder *view_holder)
Enable view processing.
Definition view_holder.c:102
void * view_holder_get_free_context(ViewHolder *view_holder)
Free callback context getter.
Definition view_holder.c:82
ViewHolder * view_holder_alloc(void)
Allocate ViewHolder.
Definition view_holder.c:23
void view_holder_set_view(ViewHolder *view_holder, View *view)
Set view for ViewHolder.
Definition view_holder.c:50
void view_holder_set_free_callback(ViewHolder *view_holder, FreeCallback free_callback, void *free_context)
Set Free callback.
Definition view_holder.c:73
void view_holder_attach_to_gui(ViewHolder *view_holder, Gui *gui)
Attach ViewHolder to GUI.
Definition view_holder.c:95