From d345615ead7252801def0d82ed0e32f71c3d105b Mon Sep 17 00:00:00 2001 From: ellson Date: Fri, 9 Oct 2009 02:06:49 +0000 Subject: [PATCH] draw function is ugly, go back to using void* for now --- lib/glcomp/glcompbutton.c | 6 +++--- lib/glcomp/glcompdefs.h | 2 +- lib/glcomp/glcomppanel.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/glcomp/glcompbutton.c b/lib/glcomp/glcompbutton.c index d9cd5b120..43d3cc995 100644 --- a/lib/glcomp/glcompbutton.c +++ b/lib/glcomp/glcompbutton.c @@ -136,11 +136,11 @@ void glCompButtonDraw(glCompButton * p) /*draw panel*/ glCompDrawRectPrism (&(ref.pos),ref.width,ref.height,p->common.borderWidth,0.01,&(ref.color),!p->status); if (p->label) - p->label->common.functions.draw(p->label); + p->label->common.functions.draw((void*)p->label); if (p->image) - p->image->common.functions.draw(p->image); + p->image->common.functions.draw((void*)p->image); if (p->common.callbacks.draw) - p->common.callbacks.draw(p); /*user defined drawing routines are called here.*/ + p->common.callbacks.draw((void*)p); /*user defined drawing routines are called here.*/ } void glCompButtonClick(glCompObj * o,GLfloat x,GLfloat y,glMouseButtonType t) diff --git a/lib/glcomp/glcompdefs.h b/lib/glcomp/glcompdefs.h index bb5122f20..f158bb184 100644 --- a/lib/glcomp/glcompdefs.h +++ b/lib/glcomp/glcompdefs.h @@ -118,7 +118,7 @@ typedef struct _glCompButton glCompButton; typedef struct _glCompObj glCompObj; /*call backs for widgets*/ -typedef void (*glcompdrawfunc_t) (glCompButton* obj); +typedef void (*glcompdrawfunc_t) (void* obj); typedef void (*glcompclickfunc_t) (glCompObj* obj,GLfloat x,GLfloat y,glMouseButtonType t); typedef void (*glcompdoubleclickfunc_t) (glCompObj* obj,GLfloat x,GLfloat y,glMouseButtonType t); typedef void (*glcompmouseoverfunc_t) (glCompObj* obj,GLfloat x,GLfloat y); diff --git a/lib/glcomp/glcomppanel.c b/lib/glcomp/glcomppanel.c index 5b95d9a29..068817a09 100644 --- a/lib/glcomp/glcomppanel.c +++ b/lib/glcomp/glcomppanel.c @@ -76,7 +76,7 @@ int glCompPanelDraw(glCompObj * o) /*draw image if there is*/ if (p->image) { - p->image->common.callbacks.draw(p->image); + p->image->common.callbacks.draw((void*)p->image); } if (p->text) { -- 2.40.0