<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>cl-gtk2 - a Common Lisp GUI library</title>
	<atom:link href="http://clgtk2.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://clgtk2.wordpress.com</link>
	<description>Development of cl-gtk2</description>
	<lastBuildDate>Wed, 06 Jul 2011 03:34:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='clgtk2.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>cl-gtk2 - a Common Lisp GUI library</title>
		<link>http://clgtk2.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://clgtk2.wordpress.com/osd.xml" title="cl-gtk2 - a Common Lisp GUI library" />
	<atom:link rel='hub' href='http://clgtk2.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Related project: sbcl-win32-threads</title>
		<link>http://clgtk2.wordpress.com/2010/09/16/related-project-sbcl-win32-threads/</link>
		<comments>http://clgtk2.wordpress.com/2010/09/16/related-project-sbcl-win32-threads/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 18:42:44 +0000</pubDate>
		<dc:creator>Kalyanov Dmitry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://clgtk2.wordpress.com/?p=82</guid>
		<description><![CDATA[For some time I wasn&#8217;t making much progress with cl-gtk2 (though I have plans to improve it) because I&#8217;ve been busy with adding native threads support for SBCL on Windows that are necessary for developing cross-platform GUI applications with SBCL and cl-gtk2. Threads are pretty much working right now and I&#8217;m now asking to test [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=82&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For some time I wasn&#8217;t making much progress with cl-gtk2 (though I have plans to improve it) because I&#8217;ve been busy with adding native threads support for SBCL on Windows that are necessary for developing cross-platform GUI applications with SBCL and cl-gtk2. Threads are pretty much working right now and I&#8217;m now asking to test and evaluate it. The sources are available at <a href="http://github.com/dmitryvk/sbcl-win32-threads">http://github.com/dmitryvk/sbcl-win32-threads</a> and the binary installer is available at <a href="https://sites.google.com/site/dmitryvksite/sbcl-distr/sbcl-1.0.40-threads-2.msi">https://sites.google.com/site/dmitryvksite/sbcl-distr/sbcl-1.0.40-threads-2.msi</a>.</p>
<p>There are still some I/O issues waiting to be resolved that affect threads (Win32 is quite weird when it comes to I/O). Lucky for me, <a href="http://akovalenko.livejournal.com/">Anton Kovalenko</a> made improvements in SBCL&#8217;s I/O for Win32.</p>
<p>cl-gtk2 seems to work in multithreaded SBCL on Windows (though I didn&#8217;t test it a lot). There is an issue that affects cl-gtk2: loading it from the SLIME REPL hangs during initialization of Gtk+ due to some deadlock in windows&#8217; C runtime &#8211; you&#8217;ll just have to enter anything in SLIME&#8217;s <em>*inferior-lisp*</em> buffer to unhang it. Hopefully, this will be resolved with help from Anton Kovalenko.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clgtk2.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clgtk2.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clgtk2.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clgtk2.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clgtk2.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clgtk2.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clgtk2.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clgtk2.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clgtk2.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clgtk2.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clgtk2.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clgtk2.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clgtk2.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clgtk2.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=82&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clgtk2.wordpress.com/2010/09/16/related-project-sbcl-win32-threads/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2489e1bbb7b21422d28f3cec3192257f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitryvk</media:title>
		</media:content>
	</item>
		<item>
		<title>Summary of recent changes to cl-gtk2 in git</title>
		<link>http://clgtk2.wordpress.com/2010/01/25/summary-of-recent-changes-to-cl-gtk2-in-git/</link>
		<comments>http://clgtk2.wordpress.com/2010/01/25/summary-of-recent-changes-to-cl-gtk2-in-git/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 15:00:17 +0000</pubDate>
		<dc:creator>Kalyanov Dmitry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://clgtk2.wordpress.com/?p=74</guid>
		<description><![CDATA[Minimum version checking When loading cl-gtk2, it now checks for Gtk+ version and raises a compile-time error Gtk+ version is too old and is not supported by cl-gtk2. I&#8217;ve had several questions about errors during loading cl-gtk2 when the Gtk+ is old. Now it should be immediately clear and will note require decrypting much less [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=74&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Minimum version checking</h2>
<p>When loading cl-gtk2, it now checks for Gtk+ version and raises a compile-time error Gtk+ version is too old and is not supported by cl-gtk2. I&#8217;ve had several questions about errors during loading cl-gtk2 when the Gtk+ is old. Now it should be immediately clear and will note require decrypting much less comprehensible error messages about missing functions.</p>
<h2>Support for multiple Gtk+ versions</h2>
<p>There is now some support for several Gtk+ versions. Upon loading, cl-gtk2 pushes symbols to <code>*features*</code> that allow to conditionally compile or not compile bindings for particular classes/methods/functions depending on versions of libraries. This means that while minimum supported Gtk+ version is 2.16, methods and classes from Gtk+ 2.18 will be available to you (of course, this requires writing bindings to them &#8211; I haven&#8217;t yet written complete bindings to Gtk+ 2.16 or Gtk+ 2.18). But the way this is implemented (by using reader conditionals) requires to recompile cl-gtk2 when Gtk+ is updated.</p>
<h2>Improvements to gtk demo</h2>
<p>I&#8217;ve improved the gtk demo a bit. Now it looks like a text page with links to various demos.</p>
<p><img src="http://img-fotki.yandex.ru/get/4108/kalyanovdmitry.0/0_2774b_2a7c3507_orig"></p>
<h2>Improvements to main loop handling</h2>
<p>I&#8217;ve made ensure-gtk-main/within-main-loop/leave-gtk-main/join-gtk-main more consistent between multi-threaded lisps and unithreaded lisps.</p>
<p>The suggested use for them is the following. In the &#8216;main&#8217; function you have code like this:</p>
<p><code>
<pre>
(within-main-loop
  (your-application-code) ;; somewhere in your application you call leave-gtk-main
)
(join-gtk-main)
</pre>
<p></code></p>
<p>E.g., to call the cl-gtk2 demonstration in this way, you just call: <code>(progn (gtk-demo:demo) (gtk:join-gtk-main))</code></p>
<p>This code will finish when the application quits the main loop, thereby quitting the application. This will work in multi-threaded and non-multi-threaded lisps.</p>
<p>In multi-threaded lisps, during development you can use within-main-loop (without join-gtk-main) to start the application in the background thread and do the development while the application is running.</p>
<h2>Fixing the finalizing of GBoxed instances by making finalization of them thread-safe</h2>
<p>That was one of rare-occuring bugs (at least for me) so this bug slipt past me. But now I&#8217;ve fixed it, and random crashes occur less often.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clgtk2.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clgtk2.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clgtk2.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clgtk2.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clgtk2.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clgtk2.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clgtk2.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clgtk2.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clgtk2.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clgtk2.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clgtk2.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clgtk2.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clgtk2.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clgtk2.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=74&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clgtk2.wordpress.com/2010/01/25/summary-of-recent-changes-to-cl-gtk2-in-git/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2489e1bbb7b21422d28f3cec3192257f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitryvk</media:title>
		</media:content>

		<media:content url="http://img-fotki.yandex.ru/get/4108/kalyanovdmitry.0/0_2774b_2a7c3507_orig" medium="image" />
	</item>
		<item>
		<title>cl-gtk2 is ASDF-installable</title>
		<link>http://clgtk2.wordpress.com/2010/01/08/cl-gtk2-is-asdf-installable/</link>
		<comments>http://clgtk2.wordpress.com/2010/01/08/cl-gtk2-is-asdf-installable/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 14:50:48 +0000</pubDate>
		<dc:creator>Kalyanov Dmitry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://clgtk2.wordpress.com/?p=71</guid>
		<description><![CDATA[I have uploaded neccessary source archives and created necessary cliki.net pages to make cl-gtk2 installable with ASDF-INSTALL. This means that it is possible to install cl-gtk2 with the following commands at the REPL: (asdf:oos 'asdf:load-op :asdf-install) (asdf-install:install :cl-gtk2-gtk) (asdf-install:install :cl-gtk2-cairo) (asdf-install:install :cl-gtk2-gtkglext)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=71&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have uploaded neccessary source archives and created necessary cliki.net pages to make cl-gtk2 installable with <a href="http://www.cliki.net/ASDF-Install">ASDF-INSTALL</a>.</p>
<p>This means that it is possible to install cl-gtk2 with the following commands at the REPL:</p>
<p><code><br />
(asdf:oos 'asdf:load-op :asdf-install)<br />
(asdf-install:install :cl-gtk2-gtk)<br />
(asdf-install:install :cl-gtk2-cairo)<br />
(asdf-install:install :cl-gtk2-gtkglext)<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clgtk2.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clgtk2.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clgtk2.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clgtk2.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clgtk2.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clgtk2.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clgtk2.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clgtk2.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clgtk2.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clgtk2.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clgtk2.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clgtk2.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clgtk2.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clgtk2.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=71&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clgtk2.wordpress.com/2010/01/08/cl-gtk2-is-asdf-installable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2489e1bbb7b21422d28f3cec3192257f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitryvk</media:title>
		</media:content>
	</item>
		<item>
		<title>Version 0.1.1 released</title>
		<link>http://clgtk2.wordpress.com/2010/01/03/version-0-1-1-released/</link>
		<comments>http://clgtk2.wordpress.com/2010/01/03/version-0-1-1-released/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 22:09:15 +0000</pubDate>
		<dc:creator>Kalyanov Dmitry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://clgtk2.wordpress.com/?p=66</guid>
		<description><![CDATA[I&#8217;ve tagged and released the current sources of cl-gtk2 as version 0.1.1. The primary motivation for this was the recent release of closer-mop library which breaks cl-gtk2-0.1 by causing symbol conflicts. Other than that, there were several bugfixes and addition of binding to most parts of Gdk, see the full changelog for details.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=66&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tagged and released the current sources of cl-gtk2 as <a href="http://common-lisp.net/project/cl-gtk2/versions.html#v0.1.1">version 0.1.1</a>.</p>
<p>The primary motivation for this was the recent release of <a href="http://common-lisp.net/project/closer/closer-mop.html">closer-mop</a> library which breaks cl-gtk2-0.1 by causing symbol conflicts.</p>
<p>Other than that, there were several bugfixes and addition of binding to most parts of Gdk, see the <a href="http://common-lisp.net/project/cl-gtk2/versions.html#v0.1.1">full changelog</a> for details.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clgtk2.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clgtk2.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clgtk2.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clgtk2.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clgtk2.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clgtk2.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clgtk2.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clgtk2.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clgtk2.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clgtk2.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clgtk2.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clgtk2.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clgtk2.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clgtk2.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=66&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clgtk2.wordpress.com/2010/01/03/version-0-1-1-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2489e1bbb7b21422d28f3cec3192257f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitryvk</media:title>
		</media:content>
	</item>
		<item>
		<title>Version 0.1 release</title>
		<link>http://clgtk2.wordpress.com/2009/10/25/version-0-1-release/</link>
		<comments>http://clgtk2.wordpress.com/2009/10/25/version-0-1-release/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 17:24:04 +0000</pubDate>
		<dc:creator>Kalyanov Dmitry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://clgtk2.wordpress.com/?p=63</guid>
		<description><![CDATA[I&#8217;ve tagged and released the current state of cl-gtk2 as a version 0.1. The source code is avaiable at http://common-lisp.net/project/cl-gtk2/files/cl-gtk2-0.1.tar.gz with installation instructions located at installation page. This was done mainly to make installation and packaging easy &#8211; having a version and source tarball helps. Also, for Gentoo Linux I&#8217;ve made an overlay with necessary [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=63&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tagged and released the current state of cl-gtk2 as a version 0.1. The source code is avaiable at <a href="http://common-lisp.net/project/cl-gtk2/files/cl-gtk2-0.1.tar.gz">http://common-lisp.net/project/cl-gtk2/files/cl-gtk2-0.1.tar.gz</a> with installation instructions located at <a href="http://common-lisp.net/project/cl-gtk2/installation.html">installation</a> page.</p>
<p>This was done mainly to make installation and packaging easy &#8211; having a version and source tarball helps.</p>
<p>Also, for Gentoo Linux I&#8217;ve made an overlay with necessary ebuilds that can be installed with layman:</p>
<pre>
layman -a lisp
layman --overlays=http://github.com/dmitryvk/cl-gtk2-overlay/raw/master/layman-list.xml -a cl-gtk2</pre>
<p>I made several changes to support <a href="http://clisp.cons.org/">CLISP</a> (they fix my incorrect usage of CLOS MOP). cl-gtk2 runs on some versions of clisp and does not run on some others. It seems that clisp in Gentoo (I don&#8217;t know yet whether it&#8217;s distro-specific or not) is broken on amd64: callbacks do not work at all since clisp-2.47 (or maybe earlier). I&#8217;ve tested on unithreaded clisp-2.48 on Windows, and cl-gtk2 ran fine there. However, this requires checking on multi-threaded builds and on other platforms.</p>
<p>I&#8217;ve also improved parts of bindings: GtkTextView, GtkTreePath and GtkTreeRowReference, GtkWidget, GtkContainer child properties, GtkFileChooser, GtkHSV, GtkTextBuffer serialization, GtkTreeModelSort, GtkTreeStore, GtkListStore.</p>
<p>New gtk:timer class is available. Instance of this class manages a single `timeout&#8217; &#8211; a function that is called by GLib main loop every n milliseconds.</p>
<p>The important addition is integration with <a href="http://common-lisp.net/project/cl-cairo2/">cl-cairo2</a>. This allows to draw on widgets with Cairo.</p>
<p><img src="http://img-fotki.yandex.ru/get/3714/kalyanovdmitry.0/0_1fa03_e409c4_orig"></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clgtk2.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clgtk2.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clgtk2.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clgtk2.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clgtk2.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clgtk2.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clgtk2.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clgtk2.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clgtk2.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clgtk2.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clgtk2.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clgtk2.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clgtk2.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clgtk2.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=63&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clgtk2.wordpress.com/2009/10/25/version-0-1-release/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2489e1bbb7b21422d28f3cec3192257f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitryvk</media:title>
		</media:content>

		<media:content url="http://img-fotki.yandex.ru/get/3714/kalyanovdmitry.0/0_1fa03_e409c4_orig" medium="image" />
	</item>
		<item>
		<title>Progress update</title>
		<link>http://clgtk2.wordpress.com/2009/10/04/progress-update/</link>
		<comments>http://clgtk2.wordpress.com/2009/10/04/progress-update/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 19:30:40 +0000</pubDate>
		<dc:creator>Kalyanov Dmitry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://clgtk2.wordpress.com/?p=55</guid>
		<description><![CDATA[cl-gtk2 is becoming more portable. I&#8217;ve added support for Microft Windows and Clozure CL. Several other popular lisp implementations are not yet supported: clisp, ecl, abcl. SBCL on windows is unithreaded only. I haven&#8217;t been able to make cl-gtk2 work if SBCL is started from SLIME (however, I haven&#8217;t tried very hard), but running from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=55&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>cl-gtk2 is becoming more portable. I&#8217;ve added support for Microft Windows and Clozure CL. Several other popular lisp implementations are not yet supported: clisp, ecl, abcl.</p>
<p>SBCL on windows is unithreaded only. I haven&#8217;t been able to make cl-gtk2 work if SBCL is started from SLIME (however, I haven&#8217;t tried very hard), but running from command-line works. And SBCL is experiencing some rare crashes.</p>
<p>Clozure CL had a <a href="http://trac.clozure.com/openmcl/ticket/593">bug</a> with its CLOS MOP implementation that had only been fixed today. In order to run cl-gtk2 under Clozure, you need to have Clozure from SVN (revision 12905 or newer). Clozure works fine on windows, has threads and is quite fast. This makes CCL more useful for development or installing on Windows. <del datetime="2009-10-04T20:36:22+00:00">But I haven&#8217;t yet added support for saving Lisp images with Clozure.</del><strong>UPD:</strong>Support for saving images with CCL has been added.</p>
<p>Using shared libraries seems more fragile on Windows (SBCL on Windows does not tolerate missing symbols like it does on Linux), and Gtk+-2.16 is a requirement for cl-gtk2.</p>
<p>Some obligatory screenshots: a simple text editor and rotating OpenGL teapot.</p>
<p><img src="http://img-fotki.yandex.ru/get/3805/kalyanovdmitry.0/0_1e7d3_a5ea3e6f_orig" alt="" /></p>
<p><img src="http://img-fotki.yandex.ru/get/3714/kalyanovdmitry.0/0_1e7d4_ae4f73ce_orig" alt="" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clgtk2.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clgtk2.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clgtk2.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clgtk2.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clgtk2.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clgtk2.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clgtk2.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clgtk2.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clgtk2.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clgtk2.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clgtk2.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clgtk2.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clgtk2.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clgtk2.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=55&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clgtk2.wordpress.com/2009/10/04/progress-update/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2489e1bbb7b21422d28f3cec3192257f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitryvk</media:title>
		</media:content>

		<media:content url="http://img-fotki.yandex.ru/get/3805/kalyanovdmitry.0/0_1e7d3_a5ea3e6f_orig" medium="image" />

		<media:content url="http://img-fotki.yandex.ru/get/3714/kalyanovdmitry.0/0_1e7d4_ae4f73ce_orig" medium="image" />
	</item>
		<item>
		<title>Fixes in cl-gtk2-gobject memory managment</title>
		<link>http://clgtk2.wordpress.com/2009/09/07/fixes-in-cl-gtk2-gobject-memory-managment/</link>
		<comments>http://clgtk2.wordpress.com/2009/09/07/fixes-in-cl-gtk2-gobject-memory-managment/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 18:01:23 +0000</pubDate>
		<dc:creator>Kalyanov Dmitry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://clgtk2.wordpress.com/?p=51</guid>
		<description><![CDATA[I&#8217;ve been debugging and fixing several bugs related to memory management of cl-gtk2. There were two main bugs that required fixing: Object denaturation. Object denaturation means that we pass a reference to an object of some type derived from GObject type but then we receive object of some other base type. E.g., we create a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=51&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been debugging and fixing several bugs related to memory management of cl-gtk2.<br />
There were two main bugs that required fixing:</p>
<ul>
<li>Object denaturation. Object denaturation means that we pass a reference to an object of some type derived from GObject type but then we receive object of some other base type. E.g., we create a custom-window deriving from gtk-window with some fields containing application data. And if there are no references to custom-window and we receive a pointer to corresponding object, we receive it as a gtk-window, not custom-window.<br />
GObject&#8217;s toggle references are designed exactly to avoid this problem in language bindings. Toggle references let the binding know when the &#8220;foreign&#8221; side has no more references to an object (and this means that we will now never receive pointer to this object) and when the &#8220;foreign&#8221; side has some references (and may potentially pass object back to us).</p>
<li>References leak. There were cases when references were leaked: the cl-gtk2-gobject increased the objects&#8217; refcount more than it should. Several generic cases of it have been fixed (references were increased twice when receiving the pointer from foreign code for the first time; functions that return already g_object_ref&#8217;ed objects).
<li>Simplification of creation of GObject instances and instances of lisp-implemented GObject classes.
</ul>
<p>The changes are in <a href="http://repo.or.cz/w/cl-gtk2.git">git</a> now.</p>
<p>But there is at least one case of reference leaking is present. Creating interface with GtkBuilder leaks some references.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clgtk2.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clgtk2.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clgtk2.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clgtk2.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clgtk2.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clgtk2.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clgtk2.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clgtk2.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clgtk2.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clgtk2.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clgtk2.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clgtk2.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clgtk2.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clgtk2.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=51&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clgtk2.wordpress.com/2009/09/07/fixes-in-cl-gtk2-gobject-memory-managment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2489e1bbb7b21422d28f3cec3192257f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitryvk</media:title>
		</media:content>
	</item>
		<item>
		<title>How to: creating custom classes for widgets</title>
		<link>http://clgtk2.wordpress.com/2009/08/29/how-to-creating-custom-classes-for-widgets/</link>
		<comments>http://clgtk2.wordpress.com/2009/08/29/how-to-creating-custom-classes-for-widgets/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 20:22:15 +0000</pubDate>
		<dc:creator>Kalyanov Dmitry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://clgtk2.wordpress.com/?p=41</guid>
		<description><![CDATA[One common way of building GUI code is to have one class for one type of widget. Slots (fields) of these classes are child widgets or some data related to the state of the widget. This approach might not be the best approach or adequate at all cases, but it is simple and quite common [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=41&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One common way of building GUI code is to have one class for one type of widget. Slots (fields) of these classes are child widgets or some data related to the state of the widget. This approach might not be the best approach or adequate at all cases, but it is simple and quite common to many programmers.</p>
<p>To use this approach, we create the class as a subclass of desired widget:</p>
<pre>(defclass custom-window (gtk-window)
  ()
  (:metaclass gobject-class))</pre>
<p>In CL-GTK2, <code>GObject</code> classes and their subclasses must have <code>gobject-class</code> as their metaclass. The absence of <code>:g-type-name</code> class option specifies that this class is mapped to <code>GObject</code> class <code>GtkWindow</code>. This means that <code>(make-instance 'custom-window)</code> creates the <code>GObject</code> class <code>GtkWindow</code> and returns the <code>custom-window</code> instance as its wrapper. CL-GTK2 maintains references to created object instances, so you will always get back the instance of <code>custom-window</code> from all Gtk+ functions, methods, properties. This means that this works as you would expect it work.</p>
<p>Often, we want to customize the creation of widgets (by specifying their properties at construction time). This is possible with <code>:default-initargs</code> class option:</p>
<pre>(defclass custom-window (gtk-window)
  ()
  (:metaclass gobject-class)
  (:default-initargs :title "Custom window"
                     :default-width 320
                     :default-height 240))</pre>
<p>Specified default-initargs will be passed into <code>GtkWindow</code>&#8216;s constructor.</p>
<p>Also it is possible to specify the :after method for initialize-instance that will initialize the the widget.</p>
<p>For example, we will have a <code>GtkLabel</code> and a <code>GtkButton</code> inside the custom-window packed into <code>GtkVBox</code>.</p>
<pre>(defclass custom-window (gtk-window)
  ((label :initform (make-instance 'label :label "A label text")
          :reader custom-window-label)
   (button :initform (make-instance 'button :label "Click me!")
           :reader custom-window-button))
  (:metaclass gobject-class)
  (:default-initargs :title "Custom window"
                     :default-width 320
                     :default-height 240))

(defmethod initialize-instance :after
    ((window custom-window) &amp;key &amp;allow-other-keys)
  (connect-signal (custom-window-button window) "clicked"
                  (lambda (button)
                    (declare (ignore button))
                    (format t "Button clicked~%")))
  (let ((box (make-instance 'v-box)))
    (container-add window box)
    (box-pack-start box (custom-window-label window))
    (box-pack-start box (custom-window-button window) :expand nil)))</pre>
<p>Now we can use the <code>custom-window</code> as a composite widget:</p>
<pre>(within-main-loop
  (let ((w (make-instance 'custom-window)))
    (widget-show w)))</pre>
<p><img src="http://clgtk2.files.wordpress.com/2009/08/screenshot-8.png?w=480" alt="Screenshot" title="Screenshot"   class="alignnone size-full wp-image-43" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clgtk2.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clgtk2.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clgtk2.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clgtk2.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clgtk2.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clgtk2.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clgtk2.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clgtk2.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clgtk2.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clgtk2.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clgtk2.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clgtk2.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clgtk2.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clgtk2.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=41&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clgtk2.wordpress.com/2009/08/29/how-to-creating-custom-classes-for-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2489e1bbb7b21422d28f3cec3192257f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitryvk</media:title>
		</media:content>

		<media:content url="http://clgtk2.files.wordpress.com/2009/08/screenshot-8.png" medium="image">
			<media:title type="html">Screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>GtkGLExt binding</title>
		<link>http://clgtk2.wordpress.com/2009/08/29/gtkglext-binding/</link>
		<comments>http://clgtk2.wordpress.com/2009/08/29/gtkglext-binding/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 16:42:47 +0000</pubDate>
		<dc:creator>Kalyanov Dmitry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://clgtk2.wordpress.com/?p=35</guid>
		<description><![CDATA[Thanks to the code by Vitaly Mayatskikh (http://13-49.blogspot.com/) that was adopted from cells-gtk3, I&#8217;ve added binding for GtkGLExt library. This binding allows create OpenGL contexts for Gtk+ widgets and draw on them with cl-opengl. That&#8217;s the screenshot of a demo:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=35&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Thanks to the code by Vitaly Mayatskikh (<a href="http://13-49.blogspot.com/">http://13-49.blogspot.com/</a>) that was adopted from cells-gtk3, I&#8217;ve added binding for GtkGLExt library. This binding allows create OpenGL contexts for Gtk+ widgets and draw on them with <a href="http://common-lisp.net/project/cl-opengl/">cl-opengl</a>.</p>
<p>That&#8217;s the screenshot of a demo:</p>
<p><img src="http://img-fotki.yandex.ru/get/3706/kalyanovdmitry.0/0_1b724_a5c8ec2a_orig"></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clgtk2.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clgtk2.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clgtk2.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clgtk2.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clgtk2.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clgtk2.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clgtk2.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clgtk2.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clgtk2.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clgtk2.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clgtk2.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clgtk2.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clgtk2.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clgtk2.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=35&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clgtk2.wordpress.com/2009/08/29/gtkglext-binding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2489e1bbb7b21422d28f3cec3192257f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitryvk</media:title>
		</media:content>

		<media:content url="http://img-fotki.yandex.ru/get/3706/kalyanovdmitry.0/0_1b724_a5c8ec2a_orig" medium="image" />
	</item>
		<item>
		<title>How-to: Creating stand-alone executable with SBCL, cl-gtk2 and cl-launch</title>
		<link>http://clgtk2.wordpress.com/2009/08/29/how-to-creating-stand-alone-executable-with-sbcl-cl-gtk2-and-cl-launch/</link>
		<comments>http://clgtk2.wordpress.com/2009/08/29/how-to-creating-stand-alone-executable-with-sbcl-cl-gtk2-and-cl-launch/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 13:14:04 +0000</pubDate>
		<dc:creator>Kalyanov Dmitry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://clgtk2.wordpress.com/?p=28</guid>
		<description><![CDATA[Let&#8217;s create a simple stand-alone GUI application. The program will be able to launch and show a window with &#8220;Hello, world&#8221; label. To build GUI, we&#8217;ll use the CL-GTK2. The process will be described step by step. Start up Slime and load CL-GTK2: (asdf:oos 'asdf:load-op :cl-gtk2-gtk) Create a source file (call it hello-world.lisp) with the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=28&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s create a simple stand-alone GUI application. The program will be able to launch and show a window with &#8220;Hello, world&#8221; label.</p>
<p>To build GUI, we&#8217;ll use the CL-GTK2. The process will be described step by step.</p>
<p>Start up Slime and load CL-GTK2:</p>
<p><code>(asdf:oos 'asdf:load-op :cl-gtk2-gtk)</code></p>
<p>Create a source file (call it hello-world.lisp) with the following content:</p>
<pre>(defpackage :hello-world
  (:use :cl :gobject :gtk)
  (:export :main :run))

(in-package :hello-world)

(defun main ()
  (within-main-loop
    (let ((w (make-instance 'gtk-window :title "Hello, world"))
          (l (make-instance 'label :label "Hello, world!")))
      (container-add w l)
      (connect-signal w "destroy" (lambda (w)
                                    (declare (ignore w))
                                    (gtk-main-quit)))
      (widget-show w))))

(defun run ()
  (main)
  (join-main-thread))</pre>
<p>In this source file, hello-world package is defined that exports two functions: main and run. The &#8216;main&#8217; function is used during development &#8211; it launches the program in a background thread (the within-main-loop macro does that) and returns immdeiately; and the &#8216;run&#8217; function is used when launching the program not from Slime (it returns only when the application is closed).</p>
<p>The join-main-thread function waits until the Gtk+ main loop finishes. It finishes when the window is closed and the gtk-window widget receives the &#8220;destroy&#8221; signal.</p>
<p>We can start the program from the Slime&#8217;s REPL:</p>
<p><code>(hello-world:main)</code></p>
<p>After you enter this expression at the REPL, Gtk+ background thread will be started and the control returns to the REPL.</p>
<p>Now let&#8217;s create the stand-alone program that will not require Lisp compiler and Lisp libraries on the user&#8217;s machine.</p>
<p>First, we define the ASDF system.</p>
<p>To do this, we create the hello-world.asd file at the same directory where hello-world.lisp file is located with the following contents:</p>
<pre>
(defsystem :hello-world
  :name "hello-world"
  :components ((:file "hello-world"))
  :depends-on (:cl-gtk2-gtk))</pre>
<p>This definition specifies the way of building the program: first load the cl-gtk2-gtk system and load the hello-world.lisp source file.</p>
<p>Usually ASDF system definitions are used to define systems that contain code of libraries and are placed (in Linux) into system-wide directory /usr/share/common-lisp/systems. But this time we define a system for a particular application and do not place it into this directory.</p>
<p>Now we can use cl-launch to create and executable file that contains all the Lisp code that is necessary.</p>
<p>First we install cl-launch. In Gentoo Linux with lisp-overlay this can be achieve with the simple command at shell prompt:</p>
<p><code>emerge dev-lisp/cl-launch</code></p>
<p>In other Linux distributions you can use the ASDF-INSTALL to install cl-launch into system-wide or used directory:</p>
<p><code>(require :asdf-install)<br />
(asdf-install:install :cl-launch)</code></p>
<p>Next we should create a Lisp image (a &#8220;core&#8221; file) that contains the cl-gtk2-gtk system and newly created hello-world application. If we will not create the image, the all code will be loaded from source files or from FASLs. Neither is fast. For example, loading cl-gtk2-gtk from FASLs takes as much as 30 seconds on my machine. During development, this is neglibible as it is loaded only once at startup.</p>
<p>Enter the following command to create the Lisp image:</p>
<p><code>cl-launch.sh -s hello-world -d hello-world-image</code></p>
<p>cl-launch loads the hello-world system (from hello-world.asd file from current directory) and saves the image as the &#8216;hello-world-image&#8217; file.</p>
<p>If several Lisp implementations are installed, you can choose which of them is used:</p>
<p><code>cl-launch.sh --lisp sbcl -s hello-world -d hello-world-image</code></p>
<p>(But at the moment, cl-gtk2-gtk supports image dumping only with SBCL)</p>
<p>Next we use cl-launch to create a shell script that starts the program from a newly created image:</p>
<p><code>cl-launch.sh -m hello-world-image -i '(hello-world:run)' -o hello-world</code></p>
<p>Now, we should have a &#8216;hello-world&#8217; shell script created.</p>
<p>Let&#8217;s run it:</p>
<p><code>./hello-world</code></p>
<p>In an instant, a window appears.</p>
<p><img src="http://img-fotki.yandex.ru/get/3612/kalyanovdmitry.0/0_19352_2f7381c5_orig" alt="" /></p>
<p>The application startup time is acceptable.</p>
<p>Now the only things that are needed to redistribute the application are hello-world-image file and hello-world shell script (and Gtk+ libraries, of course).</p>
<p>But the image size is quite big. On my machine, the image produced by 64-bit Linux version of SBCL takes 64 megabytes. Of it, SBCL takes about 42 megabytes, and the rest is cl-gtk2. SBCL is a native code generating compiler, so it produces large images. Byte-code compilers (like clisp) should have smaller sizes.</p>
<p>If this size is too much, there is an option of using gzexe program to compress the image.</p>
<p><code>gzexe hello-world-image</code></p>
<p>On my machine, this decreases the image size produced by SBCL from 64 megabytes to 12 megabytes and somewhat increases the startup time (but it is still quite fast).</p>
<p>It seems that one possible way of redistributing Lisp applications is to compile them from sources on target machine.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clgtk2.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clgtk2.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clgtk2.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clgtk2.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clgtk2.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clgtk2.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clgtk2.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clgtk2.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clgtk2.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clgtk2.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clgtk2.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clgtk2.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clgtk2.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clgtk2.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clgtk2.wordpress.com&amp;blog=8617943&amp;post=28&amp;subd=clgtk2&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clgtk2.wordpress.com/2009/08/29/how-to-creating-stand-alone-executable-with-sbcl-cl-gtk2-and-cl-launch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2489e1bbb7b21422d28f3cec3192257f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dmitryvk</media:title>
		</media:content>

		<media:content url="http://img-fotki.yandex.ru/get/3612/kalyanovdmitry.0/0_19352_2f7381c5_orig" medium="image" />
	</item>
	</channel>
</rss>
