[gambit-list] A proof of concept for (+ GTK+ gambit)
Diogo F. S. Ramos
diogofsr at gmail.com
Thu Apr 7 18:30:54 EDT 2011
I would like to thank you for the help and time that you've gave to
me. I really appreciate it.
To show that it has not be in vain, I was able to, more or less,
reproduce the GTK+ tutorial [0] using just scheme with an .o1, and from
the REPL. The code for it is:
;;;;;;;;
(let ((win (make-gtk-window 0))
(bt (make-gtk-button "hello, world")))
(connect win "delete-event" (lambda ()
(display "delete event occurred")
(newline)
#f))
(connect win "destroy" (lambda () (gtk-main-quit)))
(connect bt "clicked" (lambda () (display "hello, world")))
(connect bt "clicked" (lambda () (gtk-main-quit)))
(add win bt)
(show win)
(show bt)
(gtk-main))
;;;;;;;;
I've not cheated too much and overall it's really instantiating objects
and connecting signals (using my proxy hack).
The purpose of this is not to create a whole binding, not even 1/7 of
it, but just the bare minimum to have a working GUI.
[0] http://developer.gnome.org/gtk-tutorial/stable/c39.html#SEC-HELLOWORLD
--
Diogo F. S. Ramos
More information about the Gambit-list
mailing list