[cells-gtk-devel] cells-gtk/lispworks

Peter Denno peter.denno at nist.gov
Wed Feb 23 22:21:20 UTC 2005


Thanks!

The problem with gtk-main is that it doesn't allow other lisp processes to run 
(on Lispwork only, I think). 

I have been working to improve the Lispworks gtk-main issue. I have an 
improved version I hope to commit soon. If you would like to try it sooner, I 
think everything you need is this:

          #-lispworks(gtk-main)
          #+lispworks
          (flet ((do-gtk () (loop while (gtk-events-pending) do 
(gtk-main-iteration-do nil))))
            (unwind-protect
              (catch 'try-again
                (handler-case
                  (loop
                     (do-gtk)
                     (when (gtk-user-quit-p) 
                       (unless (eql (cells::md-state app) :eternal-rest) 
(not-to-be app))
                       (signal 'gtk-user-signals-quit))
                     (process-wait-with-timeout .01 "GTK event loop waiting"))
                  (gtk-continuable-error (err)
                    (show-message (format nil "Cells-GTK Error: ~a" 
err) :message-type :error)
                    (process-wait "Acknowledge error" #'gtk-events-pending)
                    (do-gtk)
                    (throw 'try-again nil))
                  (gtk-user-signals-quit (c)
                    (do-gtk)
                    (return-from start-app nil))))
              (unless (eql (cells::md-state app) :eternal-rest) (not-to-be 
app))
              (gtk-main-quit)
              (do-gtk)))))))


;;; Implements quits other than through destroy.
(let (quit)
  (defun gtk-user-quit-p () quit)
  (defun (setf gtk-user-quit-p) (val) 
    (setf quit val))
)



On Wednesday 23 February 2005 17:11, Juergen Gmeiner wrote:
> hi,
>
> kenny tilton meant you guys might be interested in this.
>
> minor tweaks for lispworks:
> - variables used by the demo were not set when just
>    doing a asdf:load-op.  i put the definitions in some
>    file that gets loaded by asdf
> - cvs version does not use gtk-main, but some custom
>    main loop that keeps on running even after the demo-window
>    is closed.  over here, gtk-main works works just fine
>
> this is linux 2.6.10, lispworks 4.3 personal
>
> regards,
> juergen

-- 
Best Regards,
 - Peter



More information about the cells-gtk-devel mailing list