webglade

JavaScript library to dynamically create XUL GUI from Glade XML files
git clone https://logand.com/git/webglade.git/
Log | Files | Refs | README | LICENSE

hw.ls (474B)


      1 ;;; http://common-lisp.net/project/lgtk/hw.html
      2 
      3 (defun main ()
      4   (load-xml "hw.glade"
      5             (lambda (glade)
      6               (let ((widgets (parse-glade glade)))
      7                 (wbuild document.document-element
      8                         (array (slot-value widgets "window1")))))))
      9 
     10 (defhandler "hw" (e)
     11   (alert (+ "Hello world! " e " " e.target)))
     12 
     13 (defhandler "delete_event" ()
     14   (alert "delete_event"))
     15 
     16 (defhandler "destroy" ()
     17   (alert "destroy")
     18   (gtk-main-quit))