<?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/"
	>

<channel>
	<title>Santiance &#187; C</title>
	<atom:link href="http://santiance.com/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://santiance.com</link>
	<description>Kristopher Ives&#039;s Developer Notes</description>
	<lastBuildDate>Wed, 28 Jul 2010 10:07:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Compiz Documentation Update</title>
		<link>http://santiance.com/2010/03/compiz-documentation-update/</link>
		<comments>http://santiance.com/2010/03/compiz-documentation-update/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 20:33:36 +0000</pubDate>
		<dc:creator>Kristopher Ives</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Compiz]]></category>
		<category><![CDATA[Documentation]]></category>

		<guid isPermaLink="false">http://santiance.com/?p=923</guid>
		<description><![CDATA[As the release for Compiz 0.9.0 gets closer, now is a good time to let everyone know what I&#8217;ve been most involved with: Documenting the API. Until recently, there was no API documentation for Compiz. You really have to admire the amount of time the core developers and others have spent working with a system [...]]]></description>
			<content:encoded><![CDATA[<p>As the release for <em><a href="http://www.compiz.org">Compiz</a></em> <code>0.9.0</code> gets closer, now is a good time to let everyone know what I&#8217;ve been most involved with: <a href="http://forum.compiz.org/viewtopic.php?f=89&amp;t=12029">Documenting the API</a>. Until recently, there was no API documentation for Compiz. You really have to admire the amount of time the core developers and others have spent working with a system that had no reference.</p>
<p>We&#8217;re now on the path to having a fully documented API. You can view the most recent documentation from the <em>master</em> branch here:</p>
<p style="padding-left: 30px;"><a href="http://docs.compiz.org/annotated.html">Compiz API Reference</a></p>
<p>I thought I would take a minute to thank all the developers involved and give much due credit:</p>
<p style="padding-left: 30px;"><em>Guillaume Seguin</em> (iXce) hooked together Doxygen and <code>git</code> as a post-commit hook to master, so you&#8217;ll always see the most up-to-date API reference at <code>docs.compiz.org</code></p>
<p style="padding-left: 30px;"><em>Sam Spilsbury</em> (smspillaz) helped merge my staging branch into <em>master</em> and helped me with <code>git</code>, since I appear to be handicapped with it</p>
<p>Of course this documentation is for the <code>0.0.9</code> version that should be getting released soon, and the old <code>0.8.x</code> (and before) code will remain likely remain undocumented. The new C++ architecture is much cleaner, and I&#8217;m expecting a surge in new plugins now that we have a simpler and better documented system.</p>
<p>If you&#8217;re a Compiz developer and you see a <code>TODO</code> laying around in a doc tag, help out and fill it in. Looking at the <a href="http://git.compiz.org/compiz/core/log/">commit log</a>, it appears this should work out nicely!</p>
]]></content:encoded>
			<wfw:commentRss>http://santiance.com/2010/03/compiz-documentation-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compiz Fusion Plugin Development</title>
		<link>http://santiance.com/2009/10/compiz-fusion-plugin-development/</link>
		<comments>http://santiance.com/2009/10/compiz-fusion-plugin-development/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 23:55:18 +0000</pubDate>
		<dc:creator>Kristopher Ives</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Compiz]]></category>
		<category><![CDATA[Graphics Design]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://santiance.com/?p=328</guid>
		<description><![CDATA[In between the massive changes to the site (see my twitter) and setting up new developer relationships, I was inspired to work with Compiz Fusion &#8211; or what most now just call Compiz. I&#8217;ve always wanted to do some plugins, but the problem is jumping into their largely undocumented API. That&#8217;s changing a bit now, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://santiance.com/wp-content/uploads/compiz-spinner-rims.png"><img class="alignleft size-full wp-image-337" title="Compiz Fusion with Spinner Rims plug-in" src="http://santiance.com/wp-content/uploads/compiz-spinner-rims.png" alt="compiz-spinner-rims" width="349" height="178" /></a>In between the massive changes to the site (see <a title="Kristopher Ives's Twitter" href="http://twitter.com/kristopherives" target="_blank">my twitter</a>) and setting up new developer relationships, I was inspired to work with <a title="Compiz Fusion Compositing Window Manager" href="http://compiz-fusion.org/" target="_blank">Compiz Fusion</a> &#8211; or what most now just call <em>Compiz</em>. I&#8217;ve always wanted to do some plugins, but the problem is jumping into their largely undocumented API. That&#8217;s changing a bit now, since there seems to be a better effort and they&#8217;ve got a nice start with the <a title="Compiz Fusion Wiki" href="http://wiki.compiz-fusion.org/" target="_blank">Compiz Wiki</a>. Doesn&#8217;t it always seem you can just throw <a title="MediaWiki Services" href="http://santiance.com/services/mediawiki/" target="_self">MediaWiki</a> (or in this case <em><a title="MoinMoin Wiki" href="http://moinmo.in/" target="_blank">MoinMoin</a></em>) at something and it appears to fix itself.</p>
<p>In the past we&#8217;ve all pimped out Compiz to the point where we&#8217;re basically expecting a <em>Spinner Rims</em> plug-in, but I want to change that a bit. Firstly I think that many effects use too much blending with <em>Opacity</em>, which can be sluggish on older or low-performance hardware. Plus I think the <em>Dodge</em> focus effect, <em>Show Desktop</em>, and other effects that simply &#8220;move&#8221; windows look really clean.</p>
<p><span id="more-328"></span>A nice developer on the Compiz Forums <a title="Adding an Animation (Compiz Forums)" href="http://forum.compiz.org/showthread.php?t=12020" target="_blank">helped me out in my post</a> about modifying the animations plugins, which led me to this git repository:</p>
<pre style="padding-left: 30px;">git clone git://git.compiz.org/users/smspillaz/simple-animations</pre>
<p>From there you can follow the thread on how I simply modified his <em>Fly In</em> effect to be capable of using the <em>Minimize</em> and other events. It doesn&#8217;t do exactly what I want, but the point is that the code is already integrated with <em>Compiz</em>, which is easily half the battle. I&#8217;m now in the process of doing a couple of neat things:</p>
<ul>
<li>As I decrypt the inner workings of their plugin API I would like to document</li>
<li>The best way I can think of to document is to wrap it in Java and provide bindings. This kills two birds with one stone: Java bindings and it&#8217;s a lot nicer to use <a title="Sun's Javadoc Tool!" href="http://java.sun.com/j2se/javadoc/" target="_blank">javadoc</a> over something like <a title="Doxygen Documentation System" href="http://www.doxygen.org/" target="_blank">doxygen</a>. (see our <a title="Documentation" href="http://santiance.com/doc/" target="_blank">doc/ archive</a>)</li>
</ul>
<p>The result so far was this:</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/ytIHczq4Jjw&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/ytIHczq4Jjw&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p style="text-align: center; font-size: 80%;">Flash video haters can download an <a title="Compiz Fusion Plugins Simple Video" href="http://santiance.com/files/compiz-fusion-plugins-simple.ogv" target="_blank">Ogg Video</a> (1.5Mb)</p>
<p>Let me know what you think. I&#8217;m also looking for some help with building 32-bit packages. If you want my code it&#8217;s available here:</p>
<pre style="padding-left: 30px;">bzr branch http://santiance.com/bzr/compiz-fusion-plugins-simple</pre>
<p>And just for kicks anyone with 64-bit can have <a title="64-bit compiz-fusion-plugins-simple" href="http://santiance.com/wp-content/uploads/compiz-fusion-plugins-simple_9.10-1_amd64.deb" target="_blank">this package</a> that seem to be working rather nicely for me.</p>
<p><strong>Update:</strong></p>
<p style="padding-left: 30px;">Anyone interested in compiz 0.9 docs (C++) see: <a title="Compiz Documentation" href="http://santiance.com/doc/compiz/html/annotated.html" target="_blank">http://santiance.com/doc/compiz/html/annotated.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://santiance.com/2009/10/compiz-fusion-plugin-development/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A better SDL wrapper for Java</title>
		<link>http://santiance.com/2009/10/a-better-sdl-wrapper-for-java/</link>
		<comments>http://santiance.com/2009/10/a-better-sdl-wrapper-for-java/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 17:51:05 +0000</pubDate>
		<dc:creator>Kristopher Ives</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[SDL]]></category>

		<guid isPermaLink="false">http://santiance.com/?p=200</guid>
		<description><![CDATA[I&#8217;ve been using SDL for a long time in C++, and I&#8217;ve toyed sdljava, which are rather complete bindings for SDL for Java. While the bindings are rather complete, they where created using SWIG, which is a (great) code generator, but still the result is that these bindings are kinda clunky and rather bloated. For [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a title="Simple Directmedia Library" href="http://www.libsdl.org/" target="_blank">SDL</a> for a long time in <code>C++</code>, and I&#8217;ve toyed <a title="Java Bindings for SDL" href="http://sdljava.sourceforge.net/" target="_blank">sdljava</a>, which are rather complete bindings for SDL for Java. While the bindings are rather complete, they where created using <a title="Simplified Wrapper and Interface Generator" href="http://www.swig.org/" target="_blank">SWIG</a>, which is a (great) code generator, but still the result is that these bindings are kinda clunky and rather bloated. For example, there are many intermediate classes that are prefixed with <code>SWIG_</code>. This motivated me to write my own, which I call <a title="SDLbits Project Page" href="http://santiance.com/sdlbits/" target="_blank">SDLbits</a>.</p>
<p>While it&#8217;s not as complete as sdljava, it&#8217;s much smaller and is hand written. While the idea of hand-writing lots of <code>C</code> wrapper code seems daunting, it was not much more than writing a class with many <code>native</code> methods, running <code>javah</code> and writing some simple glue. Here is quick rundown of what is supported:</p>
<ul>
<li>Video functions including support for <em>OpenGL</em> bindings. We also provide our own very small <code>GL</code> bindings, <a title="GLbits Project Page" href="http://santiance.com/glbits/" target="_blank">GLbits</a>.</li>
<li>Audio functions with support for callbacks to generate audio from Java.</li>
<li>Event functions (including SDL_SetEventFilter with a callback) and simple class system that allows for use of <code>instanceof</code>.</li>
<li>Joystick, Keyboard, and Mouse functions for polling device input.</li>
<li>Time functions like SDL_Delay and SDL_GetTicks incase their Java counterparts have undesired affects</li>
</ul>
<p>However, it&#8217;s also important to note what wasn&#8217;t implemented:</p>
<ul>
<li>Input/output (RWops) for files, since a<code> java.io.File</code> or <code>java.nio.FileChannel</code> (and variants) should be used instead.</li>
<li>Thread functions for SDL, since <code>java.lang.Thread</code> should be used instead.</li>
</ul>
<p><a href="http://santiance.com/wp-content/uploads/2009/10/comparison.png"><img class="alignright size-full wp-image-202" title="Comparison of SDLbits and sdljava" src="http://santiance.com/wp-content/uploads/2009/10/comparison.png" alt="Comparison of SDLbits and sdljava" width="344" height="198" /></a>While the code is not 100% complete, it can easily be thought of as at least 85% completed, and work will continue as warranted. It doesn&#8217;t hurt that the code is licensed under the LGPL, so anyone can modify and commit changes. Even though the code isn&#8217;t complete I compared the amount of both <code>C</code> and Java code between the projects:</p>
]]></content:encoded>
			<wfw:commentRss>http://santiance.com/2009/10/a-better-sdl-wrapper-for-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
