27 lines
599 B
C
27 lines
599 B
C
#pragma once
|
|
|
|
#include "nb_app.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define RECORD_GUI "gui"
|
|
|
|
typedef uint16_t NbScreenId;
|
|
|
|
typedef struct NbGui* NbGuiHandle;
|
|
typedef void (*InitScreen)(lv_obj_t*, NbScreenId);
|
|
|
|
NbScreenId gui_screen_create(NbGuiHandle _Nonnull gui, InitScreen callback);
|
|
void gui_screen_free(NbGuiHandle _Nonnull gui, NbScreenId id);
|
|
// TODO make internal
|
|
void gui_screen_set_parent(NbGuiHandle _Nonnull gui, NbScreenId id, lv_obj_t* parent);
|
|
lv_obj_t* gui_screen_get_parent(NbGuiHandle _Nonnull gui, NbScreenId id);
|
|
|
|
extern const NbApp gui_app;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|