天嵌二次封装库使用手册  V2.1.2
tq_fbraw.h
浏览该文件的文档.
1 
7 #ifndef LINUX_LIBV2_SOURCE_FBUTIL_FB_RAW_H_
8 #define LINUX_LIBV2_SOURCE_FBUTIL_FB_RAW_H_
9 
10 // Copyright 2024 广东省天嵌嵌入式技术股份有限公司
11 
12 #include <libhardware.h>
13 
14 
15 #ifdef __cplusplus
16 #define FBUTIL_API extern "C"
17 #else
18 #define FBUTIL_API
19 #endif
20 
26  FBUTIL_API int tq_open_framebuffer(const char *dev, struct fb_data *f_data);
27 
32  FBUTIL_API void tq_close_framebuffer(struct fb_data *f_data);
33 
43  FBUTIL_API void tq_line(struct fb_data *f_data, int x1, int y1, int x2, int y2, unsigned colidx);
44 
53  FBUTIL_API void tq_put_string(struct fb_data *f_data, int x, int y, char *s, unsigned colidx);
54 
64  FBUTIL_API void tq_rect(struct fb_data *f_data, int x1, int y1, int x2, int y2, unsigned colidx);
65 
75  FBUTIL_API void tq_fillrect(struct fb_data *f_data, int x1, int y1, int x2, int y2, unsigned colidx);
76 
85  FBUTIL_API void tq_put_string_center(struct fb_data *f_data, int x, int y, char *s, unsigned colidx);
86 
93  FBUTIL_API void tq_setcolor(struct fb_data *f_data, unsigned colidx, unsigned value);
94 
102  FBUTIL_API void tq_progress_bar(struct fb_data *f_data, int progress, const char *fmt, ...);
103 
111  FBUTIL_API void tq_put_cross(struct fb_data *f_data, int x, int y, unsigned colidx);
112 
120  FBUTIL_API int tq_show_bmp(const char *fbp, struct fb_var_screeninfo *scrinfo, const char *bmpname);
121 
128  FBUTIL_API void *tq_get_framebuffer(const char *dev, int *size);
129 
135  FBUTIL_API void tq_free_framebuffer(void *buff, int size);
136 
137 #endif
FBUTIL_API void tq_put_string_center(struct fb_data *f_data, int x, int y, char *s, unsigned colidx)
在屏幕显示一个字符串
FBUTIL_API void tq_rect(struct fb_data *f_data, int x1, int y1, int x2, int y2, unsigned colidx)
在屏幕上显示一个矩形
FBUTIL_API void tq_progress_bar(struct fb_data *f_data, int progress, const char *fmt,...)
显示进度条
FBUTIL_API int tq_show_bmp(const char *fbp, struct fb_var_screeninfo *scrinfo, const char *bmpname)
显示bmp位图
FBUTIL_API void tq_free_framebuffer(void *buff, int size)
释放framebuffer对象
FBUTIL_API int tq_open_framebuffer(const char *dev, struct fb_data *f_data)
打开framebuffer设备并用mmap建立内存映射
#define FBUTIL_API
Definition: tq_fbraw.h:18
FBUTIL_API void tq_put_string(struct fb_data *f_data, int x, int y, char *s, unsigned colidx)
在屏幕上显示一个字符串
FBUTIL_API void tq_line(struct fb_data *f_data, int x1, int y1, int x2, int y2, unsigned colidx)
在屏幕上化一条线
FBUTIL_API void tq_fillrect(struct fb_data *f_data, int x1, int y1, int x2, int y2, unsigned colidx)
填充矩形颜色
用来保存framebuffer设备相关数据
Definition: lib_fbraw.h:38
FBUTIL_API void * tq_get_framebuffer(const char *dev, int *size)
获得framebuffer对象
FBUTIL_API void tq_setcolor(struct fb_data *f_data, unsigned colidx, unsigned value)
设置屏幕颜色
FBUTIL_API void tq_close_framebuffer(struct fb_data *f_data)
关闭framebuffer设备并释放掉相关内存
FBUTIL_API void tq_put_cross(struct fb_data *f_data, int x, int y, unsigned colidx)
画交叉线