Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSG <who.just.the.doctor@gmail.com>2021-09-24 14:56:27 +0300
committerGitHub <noreply@github.com>2021-09-24 14:56:27 +0300
commit1448b9cf669b92d1d1ea1bf0aea4f5034e2d129f (patch)
tree5c5bbe79d438cc128f3e36a40130090126f5a208 /applications/gui
parent0ff677b1743705c59c2ccd8405ff91273ea7d8fd (diff)
[FL-1819][FL-1848] About: hw, fw, boot version screens. Misc corrections of the About screens. (#719)
* 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>
Diffstat (limited to 'applications/gui')
-rw-r--r--applications/gui/modules/empty_screen.c34
-rw-r--r--applications/gui/modules/empty_screen.h29
2 files changed, 63 insertions, 0 deletions
diff --git a/applications/gui/modules/empty_screen.c b/applications/gui/modules/empty_screen.c
new file mode 100644
index 00000000..a887786d
--- /dev/null
+++ b/applications/gui/modules/empty_screen.c
@@ -0,0 +1,34 @@
+#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;
+} \ No newline at end of file
diff --git a/applications/gui/modules/empty_screen.h b/applications/gui/modules/empty_screen.h
new file mode 100644
index 00000000..a0b56219
--- /dev/null
+++ b/applications/gui/modules/empty_screen.h
@@ -0,0 +1,29 @@
+#pragma once
+#include <gui/view.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Empty screen anonymous structure */
+typedef struct EmptyScreen EmptyScreen;
+
+/* Allocate and initialize empty screen
+ * This empty screen used to ask simple questions like Yes/
+ */
+EmptyScreen* empty_screen_alloc();
+
+/* Deinitialize and free empty screen
+ * @param empty_screen - Empty screen instance
+ */
+void empty_screen_free(EmptyScreen* empty_screen);
+
+/* Get empty screen view
+ * @param empty_screen - Empty screen instance
+ * @return View instance that can be used for embedding
+ */
+View* empty_screen_get_view(EmptyScreen* empty_screen);
+
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file