#ifndef PAGE_RENDERER_LCD_H
#define PAGE_RENDERER_LCD_H

#include "types.h"

typedef struct
{
    uint16_t (*get_size_x)(void);
    uint16_t (*get_size_y)(void);
    uint8_t (*get_color_font)(void);
    uint8_t (*get_color_back)(void);
    uint16_t (*get_ascii_width)(void);
    uint16_t (*get_ascii_height)(void);
    uint16_t (*get_utf8_len)(const uint8_t *str);
    uint16_t (*get_row_space)(void);
    int8_t (*fill_rect)(uint16_t left_x, uint16_t top_y, uint16_t right_x, uint16_t bottom_y, uint8_t color);
    int8_t (*line_h)(uint16_t x_start, uint16_t x_end, uint16_t y, uint16_t width, uint8_t color);
    int8_t (*line_v)(uint16_t y_start, uint16_t y_end, uint16_t x, uint16_t width, uint8_t color);
    int8_t (*line)(uint16_t x_start, uint16_t y_start, uint16_t x_end, uint16_t y_end, uint16_t width, uint8_t color);
    int8_t (*set_pixel)(uint16_t x, uint16_t y, uint8_t color);
    int8_t (*invert)(uint16_t left_x, uint16_t top_y, uint16_t right_x, uint16_t bottom_y);
    int8_t (*show_str)(uint16_t x, uint16_t y, const uint8_t *text);
    void (*clear_screen)(void);
    void (*draw_meitou)(uint16_t yStart, uint16_t width);
    void (*show_info_page)(uint16_t wPageNum, uint16_t wPageMax);
} PageRenderPort;

const PageRenderPort *PageRenderer_Lcd(void);

#endif
