mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-17 10:22:01 +03:00
1448b9cf66
* About: hw, fw, boot version screens * About: fix comment * FuriHal: proper ARR in OS tick timer * GpioTester: all pins on/off option * Irda: fix release build * Format sources Co-authored-by: あく <alleteam@gmail.com>
34 lines
946 B
C
34 lines
946 B
C
#include "empty_screen.h"
|
|
#include <furi.h>
|
|
|
|
struct EmptyScreen {
|
|
View* view;
|
|
};
|
|
|
|
static void empty_screen_view_draw_callback(Canvas* canvas, void* _model) {
|
|
canvas_clear(canvas);
|
|
}
|
|
|
|
static bool empty_screen_view_input_callback(InputEvent* event, void* context) {
|
|
return false;
|
|
}
|
|
|
|
EmptyScreen* empty_screen_alloc() {
|
|
EmptyScreen* empty_screen = furi_alloc(sizeof(EmptyScreen));
|
|
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) {
|
|
furi_assert(empty_screen);
|
|
view_free(empty_screen->view);
|
|
free(empty_screen);
|
|
}
|
|
|
|
View* empty_screen_get_view(EmptyScreen* empty_screen) {
|
|
furi_assert(empty_screen);
|
|
return empty_screen->view;
|
|
} |