flipperzero-firmware/applications/gui/gui.h

35 lines
998 B
C
Raw Normal View History

#pragma once
2020-10-15 08:32:48 +00:00
#include "widget.h"
2020-10-15 15:05:28 +00:00
#include "canvas.h"
#define GUI_DISPLAY_WIDTH 128
#define GUI_DISPLAY_HEIGHT 64
#define GUI_STATUS_BAR_X 0
#define GUI_STATUS_BAR_Y 0
#define GUI_STATUS_BAR_WIDTH GUI_DISPLAY_WIDTH
#define GUI_STATUS_BAR_HEIGHT 8
#define GUI_MAIN_X 0
#define GUI_MAIN_Y 9
#define GUI_MAIN_WIDTH GUI_DISPLAY_WIDTH
#define GUI_MAIN_HEIGHT (GUI_DISPLAY_HEIGHT - GUI_MAIN_Y)
2020-10-15 08:32:48 +00:00
typedef enum {
GuiLayerNone, /* Special layer for internal use only */
GuiLayerStatusBarLeft, /* Status bar left-side widget layer, auto-layout */
GuiLayerStatusBarRight, /* Status bar right-side widget layer, auto-layout */
GuiLayerMain, /* Main widget layer, status bar is shown */
GuiLayerFullscreen, /* Fullscreen widget layer */
GuiLayerMAX /* Don't use or move, special value */
} GuiLayer;
2020-10-16 15:25:06 +00:00
typedef struct GuiApi GuiApi;
struct GuiApi {
void (*add_widget)(GuiApi* gui_api, Widget* widget, GuiLayer layer);
void (*remove_widget)(GuiApi* gui_api, Widget* widget);
2020-10-15 15:56:47 +00:00
};