Display and UI implementation (#169)
* Menu app. Lib: add mlib submodule.
* Menu: new startup lib dependency definition
* Menu: hierarchy in menu. Cube: fix heap1/4 inconsistency, stack protection.
* GUI: rendering pipeline initial version.
* GUI: layered widget composing, FURI record. Menu: FURI record, api.
* GUI: input dispatching. Menu: switch to input from GUI.
* GUI, MENU: code style cleanup, fix type conversion warnings.
* GUI, Menu: syntax check.
* Makefile: check and reinit submodules, format.
* Menu: lock on event processing. Makefile: proper submodule initialization.
* Menu: fix stack corruption by queue.
* GUI: refactor.
* Makefile: format rule fix, st-util pid.
* GUI, Menu, FURI: format with clang-format.
* GUI, MENU: locks in critical sections, fix stack corruption, ready signaling.
* Makefile: clang format rule cleanup.
* GUI,MENU: migrate to new API.
* Applications: PRODUCTION_HW variable, skip drivers build on local target.
* refactor production build
* add git to dockerfile
* GUI: uncomment lock block
Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
2020-10-14 10:21:55 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-10-15 08:32:48 +00:00
|
|
|
#include "widget.h"
|
2020-10-15 15:05:28 +00:00
|
|
|
#include "canvas.h"
|
Display and UI implementation (#169)
* Menu app. Lib: add mlib submodule.
* Menu: new startup lib dependency definition
* Menu: hierarchy in menu. Cube: fix heap1/4 inconsistency, stack protection.
* GUI: rendering pipeline initial version.
* GUI: layered widget composing, FURI record. Menu: FURI record, api.
* GUI: input dispatching. Menu: switch to input from GUI.
* GUI, MENU: code style cleanup, fix type conversion warnings.
* GUI, Menu: syntax check.
* Makefile: check and reinit submodules, format.
* Menu: lock on event processing. Makefile: proper submodule initialization.
* Menu: fix stack corruption by queue.
* GUI: refactor.
* Makefile: format rule fix, st-util pid.
* GUI, Menu, FURI: format with clang-format.
* GUI, MENU: locks in critical sections, fix stack corruption, ready signaling.
* Makefile: clang format rule cleanup.
* GUI,MENU: migrate to new API.
* Applications: PRODUCTION_HW variable, skip drivers build on local target.
* refactor production build
* add git to dockerfile
* GUI: uncomment lock block
Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
2020-10-14 10:21:55 +00:00
|
|
|
|
2020-10-29 07:11:16 +00:00
|
|
|
#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 {
|
2020-10-26 17:00:17 +00:00
|
|
|
GuiLayerNone, /* Special layer for internal use only */
|
Display and UI implementation (#169)
* Menu app. Lib: add mlib submodule.
* Menu: new startup lib dependency definition
* Menu: hierarchy in menu. Cube: fix heap1/4 inconsistency, stack protection.
* GUI: rendering pipeline initial version.
* GUI: layered widget composing, FURI record. Menu: FURI record, api.
* GUI: input dispatching. Menu: switch to input from GUI.
* GUI, MENU: code style cleanup, fix type conversion warnings.
* GUI, Menu: syntax check.
* Makefile: check and reinit submodules, format.
* Menu: lock on event processing. Makefile: proper submodule initialization.
* Menu: fix stack corruption by queue.
* GUI: refactor.
* Makefile: format rule fix, st-util pid.
* GUI, Menu, FURI: format with clang-format.
* GUI, MENU: locks in critical sections, fix stack corruption, ready signaling.
* Makefile: clang format rule cleanup.
* GUI,MENU: migrate to new API.
* Applications: PRODUCTION_HW variable, skip drivers build on local target.
* refactor production build
* add git to dockerfile
* GUI: uncomment lock block
Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
2020-10-14 10:21:55 +00:00
|
|
|
|
2020-10-29 07:11:16 +00:00
|
|
|
GuiLayerStatusBarLeft, /* Status bar left-side widget layer, auto-layout */
|
|
|
|
GuiLayerStatusBarRight, /* Status bar right-side widget layer, auto-layout */
|
2020-10-26 17:00:17 +00:00
|
|
|
GuiLayerMain, /* Main widget layer, status bar is shown */
|
|
|
|
GuiLayerFullscreen, /* Fullscreen widget layer */
|
|
|
|
|
|
|
|
GuiLayerMAX /* Don't use or move, special value */
|
|
|
|
} GuiLayer;
|
Display and UI implementation (#169)
* Menu app. Lib: add mlib submodule.
* Menu: new startup lib dependency definition
* Menu: hierarchy in menu. Cube: fix heap1/4 inconsistency, stack protection.
* GUI: rendering pipeline initial version.
* GUI: layered widget composing, FURI record. Menu: FURI record, api.
* GUI: input dispatching. Menu: switch to input from GUI.
* GUI, MENU: code style cleanup, fix type conversion warnings.
* GUI, Menu: syntax check.
* Makefile: check and reinit submodules, format.
* Menu: lock on event processing. Makefile: proper submodule initialization.
* Menu: fix stack corruption by queue.
* GUI: refactor.
* Makefile: format rule fix, st-util pid.
* GUI, Menu, FURI: format with clang-format.
* GUI, MENU: locks in critical sections, fix stack corruption, ready signaling.
* Makefile: clang format rule cleanup.
* GUI,MENU: migrate to new API.
* Applications: PRODUCTION_HW variable, skip drivers build on local target.
* refactor production build
* add git to dockerfile
* GUI: uncomment lock block
Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
2020-10-14 10:21:55 +00:00
|
|
|
|
2020-10-16 15:25:06 +00:00
|
|
|
typedef struct GuiApi GuiApi;
|
|
|
|
struct GuiApi {
|
2020-10-26 17:00:17 +00:00
|
|
|
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
|
|
|
};
|