minor renaming
This commit is contained in:
parent
f7d63602b1
commit
b4a9865dcf
1 changed files with 5 additions and 5 deletions
|
@ -4,27 +4,27 @@
|
||||||
#include "guiregistry.h"
|
#include "guiregistry.h"
|
||||||
|
|
||||||
// https://stackoverflow.com/questions/840501/how-do-function-pointers-in-c-work
|
// https://stackoverflow.com/questions/840501/how-do-function-pointers-in-c-work
|
||||||
struct gui_functions {
|
struct gui_definition {
|
||||||
init_gui_tab this_init_gui_tab;
|
init_gui_tab this_init_gui_tab;
|
||||||
init_gui_pageIndicator this_init_gui_pageIndicator;
|
init_gui_pageIndicator this_init_gui_pageIndicator;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::list<gui_functions> registered_guis;
|
std::list<gui_definition> registered_guis;
|
||||||
|
|
||||||
void register_gui(init_gui_tab a_init_gui_tab, init_gui_pageIndicator a_gui_pageIndicator) {
|
void register_gui(init_gui_tab a_init_gui_tab, init_gui_pageIndicator a_gui_pageIndicator) {
|
||||||
registered_guis.push_back(gui_functions{a_init_gui_tab, a_gui_pageIndicator});
|
registered_guis.push_back(gui_definition{a_init_gui_tab, a_gui_pageIndicator});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void create_gui_tabs_from_gui_registry(lv_obj_t* tabview) {
|
void create_gui_tabs_from_gui_registry(lv_obj_t* tabview) {
|
||||||
std::list<gui_functions>::iterator it;
|
std::list<gui_definition>::iterator it;
|
||||||
for (it = registered_guis.begin(); it != registered_guis.end(); ++it) {
|
for (it = registered_guis.begin(); it != registered_guis.end(); ++it) {
|
||||||
it->this_init_gui_tab(tabview);
|
it->this_init_gui_tab(tabview);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void create_gui_pageIndicators_from_gui_registry(lv_obj_t* panel) {
|
void create_gui_pageIndicators_from_gui_registry(lv_obj_t* panel) {
|
||||||
std::list<gui_functions>::iterator it;
|
std::list<gui_definition>::iterator it;
|
||||||
for (it = registered_guis.begin(); it != registered_guis.end(); ++it) {
|
for (it = registered_guis.begin(); it != registered_guis.end(); ++it) {
|
||||||
it->this_init_gui_pageIndicator(panel);
|
it->this_init_gui_pageIndicator(panel);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue