Files
luban-lite/packages/third-party/awtk-ui/awtk/src/lcd/lcd_mem_special.h

74 lines
2.0 KiB
C
Raw Normal View History

2023-11-09 20:19:51 +08:00
/**
* File: lcd_mem_special.h
* Author: AWTK Develop Team
* Brief: lcd_mem_special
*
* Copyright (c) 2018 - 2023 Guangzhou ZHIYUAN Electronics Co.,Ltd.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* License file for more details.
*
*/
/**
* History:
* ================================================================
* 2019-06-17 Li XianJing <xianjimli@hotmail.com> created
*
*/
#ifndef LCD_MEM_SPECIAL_H
#define LCD_MEM_SPECIAL_H
#include "base/lcd.h"
#include "lcd/lcd_mem.h"
BEGIN_C_DECLS
/**
* @class lcd_mem_special_t
* @parent lcd_t
* LCD
*
* flush函数来提交GUI绘制的结果到硬件
*
* * lcd framebufferSPI接口的屏
* * lcd framebufferAWTK目前不支持flush进行格式转换
*
*
*/
typedef struct _lcd_mem_special_t {
lcd_mem_t base;
bitmap_format_t format;
/*custom info*/
void* ctx;
lcd_flush_t on_flush;
lcd_resize_t on_resize;
lcd_destroy_t on_destroy;
} lcd_mem_special_t;
/**
* @method lcd_mem_special_create
*
* lcd对象
*
* @param {wh_t} w
* @param {wh_t} h
* @param {bitmap_format_t} fmt 线lcd的格式 BITMAP_FMT_BGR565 BITMAP_FMT_RGBA8888
* @param {lcd_flush_t} on_flush GUI数据到实际的LCD
* @param {lcd_resize_t} on_resize LCD的大小NULL即可
* @param {lcd_destroy_t} on_destroy lcd销毁时的回调函数
* @param {void*} ctx
*
* @return {lcd_t*} lcd对象
*/
lcd_t* lcd_mem_special_create(wh_t w, wh_t h, bitmap_format_t fmt, lcd_flush_t on_flush,
lcd_resize_t on_resize, lcd_destroy_t on_destroy, void* ctx);
END_C_DECLS
#endif /*LCD_MEM_SPECIAL_H*/