2021-09-24 14:56:27 +03:00
|
|
|
#include "empty_screen.h"
|
|
|
|
#include <furi.h>
|
|
|
|
|
|
|
|
struct EmptyScreen {
|
|
|
|
View* view;
|
|
|
|
};
|
|
|
|
|
|
|
|
static void empty_screen_view_draw_callback(Canvas* canvas, void* _model) {
|
2022-05-06 16:37:10 +03:00
|
|
|
UNUSED(_model);
|
2021-09-24 14:56:27 +03:00
|
|
|
canvas_clear(canvas);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool empty_screen_view_input_callback(InputEvent* event, void* context) {
|
2022-05-06 16:37:10 +03:00
|
|
|
UNUSED(event);
|
|
|
|
UNUSED(context);
|
2021-09-24 14:56:27 +03:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-03-25 13:53:32 +03:00
|
|
|
EmptyScreen* empty_screen_alloc(void) {
|
2022-02-18 22:53:46 +03:00
|
|
|
EmptyScreen* empty_screen = malloc(sizeof(EmptyScreen));
|
2021-09-24 14:56:27 +03:00
|
|
|
empty_screen->view = view_alloc();
|
|
|
|
view_set_context(empty_screen->view, empty_screen);
|
|
|
|
view_set_draw_callback(empty_screen->view, empty_screen_view_draw_callback);
|
|
|
|
view_set_input_callback(empty_screen->view, empty_screen_view_input_callback);
|
|
|
|
return empty_screen;
|
|
|
|
}
|
|
|
|
|
|
|
|
void empty_screen_free(EmptyScreen* empty_screen) {
|
2024-03-25 13:53:32 +03:00
|
|
|
furi_check(empty_screen);
|
2021-09-24 14:56:27 +03:00
|
|
|
view_free(empty_screen->view);
|
|
|
|
free(empty_screen);
|
|
|
|
}
|
|
|
|
|
|
|
|
View* empty_screen_get_view(EmptyScreen* empty_screen) {
|
2024-03-25 13:53:32 +03:00
|
|
|
furi_check(empty_screen);
|
2021-09-24 14:56:27 +03:00
|
|
|
return empty_screen->view;
|
2022-02-18 22:53:46 +03:00
|
|
|
}
|