请问下面两段之间是什么关系呢,查资料越看越糊涂了……谢谢大家!
typedef struct{
REGION_T region;
int (* dot)(int ,int ,COLOR_T /* c */);
int (* line)(int /* x0 */,int /* y0 */,int /* x1 */,int /* y1 */,COLOR_T c);
int (* rect)(RECT_T * /* r */);
int (* box)(BOX_T * /* b */ );
int (* set_cursor)(int /* x */,int /* y */);
int (* line_to)(int /* x */,int /* y */,COLOR_T /* c */);
int (* arrow)(int x,int y,int dir,COLOR_T c);
int (* processbar)(PROCESSBAR_T *);
int (* splitter)(SPLITTER_T *);
int (* check_box)(CHECK_BOX_T *);
int (* circle)(int x,int y,int r,int fill,COLOR_T c);
int (* scrollbar)(SCROLLBAR_T *);
int (* show_picture)(int x,int y,int width,int height,char * path);
int (* dialog)(const char * fmt,...);
}GUI_T;
static int dot(int x, int y, COLOR_T c);
static int line(int /* x0 */, int /* y0 */, int /* x1 */, int /* y1 */, COLOR_T);
static int rect(RECT_T *);
static int box(BOX_T *);
static int line_to(int /* x */, int /* y */, COLOR_T /* c */);
static int set_cursor(int /* x */, int /* y */);
static int draw_arrow(int x, int y, int dir, COLOR_T c);
static int processbar(PROCESSBAR_T *);
static int splitter(SPLITTER_T *);
static int check_box(CHECK_BOX_T *);
static int circle(int x, int y, int r, int fill, COLOR_T c);
static int scrollbar(SCROLLBAR_T *);
static int show_picture(int x,int y,int width,int height,char * path);
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
没出现问题,就是搞不明白三者之间的关系,再加上下面这一段
GUI_T gui = {
.dot = dot,
.line = line,
.rect = rect,
.box = box,
.arrow = draw_arrow,
.set_cursor = set_cursor,
.line_to = line_to,
.processbar = processbar,
.splitter = splitter,
.check_box = check_box,
.circle = circle,
.scrollbar = scrollbar,
.show_picture = show_picture,
.region.x0 = 0,
.region.y0 = 0,
.region.x1 = LCD_XSIZE,
.region.y1 = LCD_YSIZE
};
一周热门 更多>