mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-18 16:53:45 +00:00
4d6b170769
* Fixing compiler warnings with -Wextra * More warnings suppression, WIP * Even more warning fixes * Added new lines at end of text files. * Padding fix * Additional fixes to warnings on different build configurations; added -Wextra to default build pipeline * Fixes for Secplus v1 * -additional warnings * +-Wredundant-decls fixes * FuriHal: print stack overflow task name in console * FuriHal: add missing include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
37 lines
1,003 B
C
37 lines
1,003 B
C
#include "empty_screen.h"
|
|
#include <furi.h>
|
|
|
|
struct EmptyScreen {
|
|
View* view;
|
|
};
|
|
|
|
static void empty_screen_view_draw_callback(Canvas* canvas, void* _model) {
|
|
UNUSED(_model);
|
|
canvas_clear(canvas);
|
|
}
|
|
|
|
static bool empty_screen_view_input_callback(InputEvent* event, void* context) {
|
|
UNUSED(event);
|
|
UNUSED(context);
|
|
return false;
|
|
}
|
|
|
|
EmptyScreen* empty_screen_alloc() {
|
|
EmptyScreen* empty_screen = malloc(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;
|
|
}
|