mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-22 10:43:11 +00:00
665f6d7d9c
* Assets: import from gdrive * Assets: fully working build pipeline and registry * NFC: menu icon * Gui: layers. Irukagotchi: base app to handle input on idle screen. Makefile: reboot after flash in dfu mode. * ValueMutex: with lambda * Assets: proper animation frames sorting * ValueMutex: proper furi_open usage * Assets,GUI: split icon into icon data and icon state. * Format source code * Docker: add python3 and imagemagic * Irukagotchi: cleanup * GUI: event lock moved to gui. * Rfid: proper gui layer * GUI: elements. Menu: frame and scroll * GUI, Menu: format code. * Menu: dual font main menu * Menu: format sources * GUI: 0 total scrollbar * CI: enable lfs * Menu: pixel perfect main menu Co-authored-by: Aleksandr Kutuzov <aku@plooks.com> Co-authored-by: aanper <mail@s3f.ru>
33 lines
1,008 B
C
33 lines
1,008 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <u8g2.h>
|
|
#include <gui/icon.h>
|
|
|
|
typedef enum {
|
|
ColorWhite = 0x00,
|
|
ColorBlack = 0x01,
|
|
} Color;
|
|
|
|
typedef enum {
|
|
FontPrimary = 0x00,
|
|
FontSecondary = 0x01,
|
|
} Font;
|
|
|
|
typedef struct CanvasApi CanvasApi;
|
|
struct CanvasApi {
|
|
uint8_t (*width)(CanvasApi* canvas);
|
|
uint8_t (*height)(CanvasApi* canvas);
|
|
|
|
void (*clear)(CanvasApi* canvas);
|
|
|
|
void (*set_color)(CanvasApi* canvas, Color color);
|
|
void (*set_font)(CanvasApi* canvas, Font font);
|
|
|
|
void (*draw_str)(CanvasApi* canvas, uint8_t x, uint8_t y, const char* str);
|
|
void (*draw_icon)(CanvasApi* canvas, uint8_t x, uint8_t y, Icon* icon);
|
|
void (*draw_dot)(CanvasApi* canvas, uint8_t x, uint8_t y);
|
|
void (*draw_box)(CanvasApi* canvas, uint8_t x, uint8_t y, uint8_t width, uint8_t height);
|
|
void (*draw_frame)(CanvasApi* canvas, uint8_t x, uint8_t y, uint8_t width, uint8_t height);
|
|
void (*draw_line)(CanvasApi* canvas, uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2);
|
|
};
|