GUI: hide canvas inside

This commit is contained in:
Aleksandr Kutuzov
2020-10-16 16:34:36 +03:00
parent 23478fd175
commit 1a36dfc5d3
3 changed files with 60 additions and 60 deletions

View File

@@ -8,30 +8,13 @@ typedef enum {
ColorBlack = 0x01,
} Color;
typedef const uint8_t* Font;
typedef struct {
Font primary;
Font secondary;
} Fonts;
struct _CanvasApi;
typedef struct _CanvasApi CanvasApi;
// Canvas is private but we need its declaration here
typedef struct {
u8g2_t fb;
uint8_t offset_x;
uint8_t offset_y;
uint8_t width;
uint8_t height;
} Canvas;
struct _CanvasApi {
Canvas canvas;
Fonts* fonts;
typedef enum {
FontPrimary = 0x00,
FontSecondary = 0x01,
} Font;
typedef struct CanvasApi CanvasApi;
struct CanvasApi {
uint8_t (*width)(CanvasApi* canvas);
uint8_t (*height)(CanvasApi* canvas);