From 7505e88db66798b2b8fcdff2d92a7136cd826b5b Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 9 Sep 2010 02:26:30 +0200 Subject: Upgrading to IUP 3.2 - and cleaning up. --- iup/test/glcanvas.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'iup/test/glcanvas.c') diff --git a/iup/test/glcanvas.c b/iup/test/glcanvas.c index 6a34c29..8c8fbd2 100755 --- a/iup/test/glcanvas.c +++ b/iup/test/glcanvas.c @@ -11,6 +11,12 @@ #include "iupgl.h" +static int button_cb(Ihandle *ih,int but,int pressed,int x,int y,char* status) +{ + printf("BUTTON_CB(but=%c (pressed=%d), x=%d, y=%d [%s])\n",(char)but,pressed,x,y, status); + return IUP_DEFAULT; +} + static int action(Ihandle *ih) { IupGLMakeCurrent(ih); @@ -45,6 +51,7 @@ void GLCanvasTest(void) IupSetAttribute(canvas, "BUFFER", "DOUBLE"); IupSetAttribute(canvas, "BORDER", "NO"); IupSetAttribute(canvas, "RASTERSIZE", "300x200"); + IupSetCallback(canvas, "BUTTON_CB", (Icallback)button_cb); IupAppend(box, canvas); dlg = IupDialog(box); -- cgit v1.2.3