2021-09-28 09:40:39 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gui/gui_i.h>
|
|
|
|
#include <gui/view.h>
|
|
|
|
#include <gui/canvas.h>
|
|
|
|
#include <gui/elements.h>
|
|
|
|
#include <furi.h>
|
|
|
|
#include <storage/storage.h>
|
2021-10-07 13:32:37 +00:00
|
|
|
#include <time.h>
|
2022-01-02 21:39:56 +00:00
|
|
|
#include "desktop_events.h"
|
2021-09-28 09:40:39 +00:00
|
|
|
|
|
|
|
typedef struct DesktopDebugView DesktopDebugView;
|
|
|
|
|
2022-01-02 21:39:56 +00:00
|
|
|
typedef void (*DesktopDebugViewCallback)(DesktopEvent event, void* context);
|
2021-09-28 09:40:39 +00:00
|
|
|
|
|
|
|
// Debug info
|
|
|
|
typedef enum {
|
|
|
|
DesktopViewStatsFw,
|
|
|
|
DesktopViewStatsBoot,
|
|
|
|
DesktopViewStatsMeta,
|
|
|
|
DesktopViewStatsTotalCount,
|
|
|
|
} DesktopViewStatsScreens;
|
|
|
|
|
|
|
|
struct DesktopDebugView {
|
|
|
|
View* view;
|
|
|
|
DesktopDebugViewCallback callback;
|
|
|
|
void* context;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t icounter;
|
|
|
|
uint32_t butthurt;
|
2021-10-07 13:32:37 +00:00
|
|
|
uint64_t timestamp;
|
2021-09-28 09:40:39 +00:00
|
|
|
DesktopViewStatsScreens screen;
|
|
|
|
} DesktopDebugViewModel;
|
|
|
|
|
|
|
|
void desktop_debug_set_callback(
|
|
|
|
DesktopDebugView* debug_view,
|
|
|
|
DesktopDebugViewCallback callback,
|
|
|
|
void* context);
|
|
|
|
|
|
|
|
View* desktop_debug_get_view(DesktopDebugView* debug_view);
|
|
|
|
|
|
|
|
DesktopDebugView* desktop_debug_alloc();
|
|
|
|
void desktop_debug_free(DesktopDebugView* debug_view);
|
|
|
|
|
|
|
|
void desktop_debug_get_dolphin_data(DesktopDebugView* debug_view);
|
2022-01-02 21:39:56 +00:00
|
|
|
void desktop_debug_reset_screen_idx(DesktopDebugView* debug_view);
|