[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:
@@ -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
|
||||
|
Reference in New Issue
Block a user