summaryrefslogtreecommitdiff
path: root/iup/test/glcanvas.c
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:26:30 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:32:26 +0200
commit7505e88db66798b2b8fcdff2d92a7136cd826b5b (patch)
treeb6ced565318f8e8112e35cb0ad53abe4212ef8de /iup/test/glcanvas.c
parente9a184546b18cf3b796bd560561f312934004c54 (diff)
Upgrading to IUP 3.2 - and cleaning up.
Diffstat (limited to 'iup/test/glcanvas.c')
-rwxr-xr-xiup/test/glcanvas.c7
1 files changed, 7 insertions, 0 deletions
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);