[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] iup cells draw callback

From: Martin DeMello
Subject: [Chicken-users] iup cells draw callback
Date: Wed, 14 Oct 2015 00:51:28 -0700


I'm trying to port the chessboard example from IUP to chicken. The C code is here:

I'm stuck when trying to add a draw callback - it crashes with 

Error: (callback-set!) callback has bad signature

The code is here: or below:

(use iup)

(define (nlines self) 8)
(define (ncols self) 8)
(define (height self line) 50)
(define (width self col) 50)

(define (draw self i j xmin xmax ymin ymax canvas) 'default)

(define dlg
      (cells name: "Chessboard"
             height-cb: height
             width-cb: width
             nlines-cb: nlines
             ncols-cb: ncols
             draw-cb: draw)
      (button title: 'E&xit
              expand: 'Yes
              tip: "Close button"
              action: (lambda (self) 'close)))
    title: 'IUP))

(show dlg)
(destroy! dlg)
(exit 0)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]