flipperzero-firmware/applications/gui/canvas.h
coreglitch b2a12d091a
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 13:21:55 +03:00

25 lines
577 B
C

#pragma once
#include <stdint.h>
#include <u8g2.h>
#define COLOR_WHITE 0x00
#define COLOR_BLACK 0x01
#define CANVAS_FONT_PRIMARY u8g2_font_Born2bSportyV2_tr
#define CANVAS_FONT_SECONDARY u8g2_font_HelvetiPixel_tr
typedef struct Canvas Canvas;
typedef const uint8_t* font_t;
uint8_t canvas_width(Canvas* canvas);
uint8_t canvas_height(Canvas* canvas);
void canvas_clear(Canvas* canvas);
void canvas_color_set(Canvas* canvas, uint8_t color);
void canvas_font_set(Canvas* canvas, font_t font);
void canvas_str_draw(Canvas* canvas, uint8_t x, uint8_t y, const char* str);