[FL-867] GUI: ViewPort arrangement API, better input and draw dispatching (#333)

* Input: refactoring, platform agnostic key configuration, update usage across project. Minor queue usage fixes and tick timings.
* Gui: lighter and more efficient input and draw call dispatching, ViewPort rearranging API. View: conditional model updates, API usage update.
* BT: smaller update delay
* GUI: ViewPort visibility check
This commit is contained in:
あく
2021-02-10 12:06:29 +03:00
committed by GitHub
parent 928bca4eaa
commit 2d09b8e318
18 changed files with 299 additions and 199 deletions

View File

@@ -137,20 +137,21 @@ void* view_get_model(View* view);
/* Commit view model
* @param view, pointer to View
* @param update, true if you want to emit view update, false otherwise
*/
void view_commit_model(View* view);
void view_commit_model(View* view, bool update);
/*
* With clause for view model
* @param view, View instance pointer
* @param function_body a (){} lambda declaration,
* executed within you parent function context.
* @param function_body a (){} lambda declaration, executed within you parent function context
* @return true if you want to emit view update, false otherwise
*/
#define with_view_model(view, function_body) \
{ \
void* p = view_get_model(view); \
({ void __fn__ function_body __fn__; })(p); \
view_commit_model(view); \
#define with_view_model(view, function_body) \
{ \
void* p = view_get_model(view); \
bool update = ({ bool __fn__ function_body __fn__; })(p); \
view_commit_model(view, update); \
}
#ifdef __cplusplus