1b78418f9f
* GUI: view. Flooper-blooper fix compilation error. * GUI: view and viewdispatcher bones * GUI: view implementation, view models, view dispatcher * GUI: view navigation, model refinement. Power: use view, view dispatcher. * HAL Flash: proper page write. Dolphin: views. Power: views * Dolphin: transition idle scree to Views * Dolphin: input events on stats view. Format sources. * HAL: flash erase. Dolphin: permanent state storage. * Dolphin: first start welcome. HAL: flash operation status, errata 2.2.9 crutch.
46 lines
1.3 KiB
C
46 lines
1.3 KiB
C
#pragma once
|
|
|
|
#include "view.h"
|
|
#include "gui.h"
|
|
|
|
/* ViewDispatcher widget placement */
|
|
typedef enum {
|
|
ViewDispatcherTypeNone, /* Special layer for internal use only */
|
|
ViewDispatcherTypeWindow, /* Main widget layer, status bar is shown */
|
|
ViewDispatcherTypeFullscreen /* Fullscreen widget layer */
|
|
} ViewDispatcherType;
|
|
|
|
typedef struct ViewDispatcher ViewDispatcher;
|
|
|
|
/* Allocate ViewDispatcher
|
|
* @return pointer to ViewDispatcher instance
|
|
*/
|
|
ViewDispatcher* view_dispatcher_alloc();
|
|
|
|
/* Free ViewDispatcher
|
|
* @param pointer to View
|
|
*/
|
|
void view_dispatcher_free(ViewDispatcher* view_dispatcher);
|
|
|
|
/* Add view to ViewDispatcher
|
|
* @param view_dispatcher, ViewDispatcher instance
|
|
* @param view_id, View id to register
|
|
* @param view, View instance
|
|
*/
|
|
void view_dispatcher_add_view(ViewDispatcher* view_dispatcher, uint32_t view_id, View* view);
|
|
|
|
/* Switch to View
|
|
* @param view_dispatcher, ViewDispatcher instance
|
|
* @param view_id, View id to register
|
|
*/
|
|
void view_dispatcher_switch_to_view(ViewDispatcher* view_dispatcher, uint32_t view_id);
|
|
|
|
/* Attach ViewDispatcher to GUI
|
|
* @param view_dispatcher, ViewDispatcher instance
|
|
* @param gui, GUI instance to attach to
|
|
*/
|
|
void view_dispatcher_attach_to_gui(
|
|
ViewDispatcher* view_dispatcher,
|
|
Gui* gui,
|
|
ViewDispatcherType type);
|