[FL-1286] Add vertical screen orientation (#472)

This commit is contained in:
Albert Kharisov
2021-05-19 12:43:15 +03:00
committed by GitHub
parent f5f9a04fda
commit 4fa49882e0
16 changed files with 248 additions and 4 deletions

View File

@@ -20,6 +20,11 @@ extern "C" {
*/
#define VIEW_DESTROY 0xFFFFFFFA
typedef enum {
ViewOrientationHorizontal,
ViewOrientationVertical,
} ViewOrientation;
/* View, anonymous type */
typedef struct View View;
@@ -137,6 +142,12 @@ void view_set_update_callback_context(View* view, void* context);
*/
void view_set_context(View* view, void* context);
/* Set View Orientation
* @param view, pointer to View
* @param orientation, either vertical or horizontal
*/
void view_set_orientation(View* view, ViewOrientation orientation);
/* Allocate view model.
* @param view, pointer to View
* @param type, View Model Type
@@ -186,4 +197,4 @@ void view_commit_model(View* view, bool update);
bool update = ({ bool __fn__ function_body __fn__; })(p); \
view_commit_model(view, update); \
}
#endif
#endif