cbaggers/cepl — pull request #16 by jkordani (2014-06-14 05:33:59+00:00)
Title: a change to get a.lisp example working again, and a change to get osx framed windows.

Also, run-demo calls must be wrapped in (sdl2:in-main-thread ()... as they all handle sdl events, then examples work in osx. unfortunately you have to issue an emacs break to get the prompt back.

byulparan https://github.com/byulparan had a helper macro that when used with run-demo would return the prompt immediately, reproduced for ccl here (set :waitp t) :
#+ccl
(defmacro call-in-main-thread ((&key (waitp t)) &body body)
"Some routine must call in main thread. especially about sounds or gui works.
This macro interruption to main-thread, and wait until returning body form."
(if waitp `(ccl::call-in-initial-process
(lambda () ,@body))
`(ccl::process-interrupt
ccl::*initial-process*
(lambda () ,@body))))

he used to have it in its own cl project but I guess he's moved it. let me know if you want to see all of it, there was support for sbcl (which I haven't tested) and ecl