<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 10, 2017, at 4:26 AM, Ralf Mattes <<a href="mailto:rm@seid-online.de" class="">rm@seid-online.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Fri, Mar 10, 2017 at 07:53:37AM -0500, Craig Lanning wrote:<br class=""><blockquote type="cite" class="">On Thu, 2017-03-09 at 20:37 -0800, R. Matthew Emerson wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class="">On Mar 9, 2017, at 1:56 PM, Craig Lanning <<a href="mailto:craig.t.lanning@gmail.co" class="">craig.t.lanning@gmail.co</a><br class="">m> wrote:<br class=""><br class="">I'm running into trouble with the CLX backend for CLIM.<br class=""><br class="">I noticed that there seems to be support in Clozure CL for GTK2 on<br class="">Linux. How do I get access to that? What do I need to load?<br class=""></blockquote><br class="">I'm not sure it's fair to say that there is "support" for GTK, per<br class="">se.<br class=""><br class="">There are a couple of example programs in ccl:examples; viz. gtk-<br class="">minesweeper.lisp and gtk2-clock.lisp.<br class=""></blockquote><br class="">I found these after I sent my message yesterday.<br class=""><br class=""><blockquote type="cite" class="">Maybe they'll be helpful, but I wouldn't be surprised if these<br class="">examples have bit-rotted.<br class=""></blockquote></blockquote><br class="">Well, they are Gtk2, so they definitely did rot ;-)<br class=""><br class=""><blockquote type="cite" class=""><br class="">I was unable to get them to work.<br class=""><br class="">Is there any other info about how to access the GTK/GNOME GUI system?<br class=""></blockquote><br class="">You could of course generate interface information for gtk3, but that's <br class="">a very unpleasant task, IIRC.<br class=""></div></div></blockquote><div><br class=""></div>I seem to recall reading that gtk3 was more fussy about which thread that the event loop runs on. It may require it to be run on the initial thread. It seems that many UI toolkits have a requirement like this. I know that MS Windows doesn't have that requirement. Let's hear it for Windows, at least on this particular matter, right?</div><div><br class=""><div>It takes a little bit of fiddling to make new interfaces, true.</div><div><br class=""></div><div>Here are some things about building and using the ffigen translator.</div><div><br class=""></div><div><a href="http://trac.clozure.com/ccl/wiki/ForeignFunctionInterface" class="">http://trac.clozure.com/ccl/wiki/ForeignFunctionInterface</a></div><div><a href="http://trac.clozure.com/ccl/wiki/BuildFFIGEN" class="">http://trac.clozure.com/ccl/wiki/BuildFFIGEN</a></div><div><a href="http://trac.clozure.com/ccl/wiki/CustomFramework" class="">http://trac.clozure.com/ccl/wiki/CustomFramework</a></div><div><br class=""></div><div>Bringing the ffi translator up-to-date is an important task that needs to be done. It will take some effort to get familiar with all the working parts, so it's probably not the first thing that a new contributor would want to tackle. <a href="https://github.com/Clozure/ccl/issues/13" class="">https://github.com/Clozure/ccl/issues/13</a></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="">BTW, is there any good documentation about the interface database (i.e.<br class="">it's inner workings)?<br class=""></div></div></blockquote><div><br class=""></div><div>There's <a href="http://ccl.clozure.com/docs/ccl.html#the-interface-database" class="">http://ccl.clozure.com/docs/ccl.html#the-interface-database</a> and <a href="http://ccl.clozure.com/docs/ccl.html#the-interface-translator" class="">http://ccl.clozure.com/docs/ccl.html#the-interface-translator</a> but I don't claim that that documentation is comprehensive. The idea is really pretty simple: process some header files into an s-expression format (this is what ffigen does). Then, process that (via the code in ccl:library;parse-ffi.lisp) into a binary database that contains type/record/constant/function definitions. Then, write some reader macros, e.g., #_ or #& that look stuff up in these databases and then produce suitable (external-call ...) or (foreign-symbol-address ...) or whatever.</div><div><br class=""></div><div>If you evaluate forms like (quote #&sys_errlist) or (macroexpand '(#_getpid)) you will see what primitives this stuff expands into. Note that it's sometimes useful to call the external-call macro directly: it's somewhat nicer to use than %ff-call. (macroexpand '(external-call "getpid" :pid_t)) will show you that it expands into the exact same thing you get by calling (#_getpid).</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class=""> Cheers, Ralf Mattes<br class=""><br class=""><blockquote type="cite" class=""><br class="">Craig<br class=""><br class="">_______________________________________________<br class="">Openmcl-devel mailing list<br class=""><a href="mailto:Openmcl-devel@clozure.com" class="">Openmcl-devel@clozure.com</a><br class="">https://lists.clozure.com/mailman/listinfo/openmcl-devel<br class=""></blockquote></div></div></blockquote></div><br class=""></body></html>