<?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>Context Switch &#187; Hacking</title>
	<atom:link href="http://blogs.gnome.org/ebassi/tag/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/ebassi</link>
	<description>Just another GNOME Blogs weblog</description>
	<lastBuildDate>Thu, 29 Sep 2011 19:13:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Dream About Flying</title>
		<link>http://blogs.gnome.org/ebassi/2009/02/20/dream-about-flying/</link>
		<comments>http://blogs.gnome.org/ebassi/2009/02/20/dream-about-flying/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 21:48:23 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clutter]]></category>
		<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=262</guid>
		<description><![CDATA[as usual — long time, no blog. my only excuse is that I was busy with other things: new job, new office, holidays&#8230; you know, whatever happens between coding. it&#8217;s that time of year again, and we&#8217;re nearing another Clutter release — this time it&#8217;s a special one, though, as it is 1.0.0. which also [...]]]></description>
			<content:encoded><![CDATA[<p>as usual — long time, no blog.</p>
<p>my only excuse is that I was busy with other things: new job, new office, holidays&#8230; you know, whatever happens between coding. <img src='http://blogs.gnome.org/ebassi/wp-content/mu-plugins/tango-smilies/tango/face-smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>it&#8217;s that time of year again, and we&#8217;re nearing another <a href="http://www.clutter-project.org">Clutter</a> release — this time it&#8217;s a special one, though, as it is <strong>1.0.0</strong>. which also means that the API will be frozen for the entire duration of the 1.x branch: only additions and deprecations will be allowed ((no worries about stagnation, though — we are already planning for 2.0, even though it&#8217;ll take at least a couple of years to get there)).</p>
<p>since we&#8217;re in the process of finalizing <a href="http://www.clutter-project.org/docs/clutter/unstable/">the 1.0 API</a> I thought about writing something about what changed, what was added and what has been removed for good.</p>
<p>let&#8217;s start with <strong>the Effects API</strong>. the Effects were meant to provide a high level API for simple, <em>fire-and-forget</em> animations ((even though people always tried to find new ways to abuse the term &#8220;fire-and-forget&#8221;)). they were sub-obtimal in the memory management — you had to keep around the EffectTemplate, the effects copied the timelines — and they weren&#8217;t <em>extensible</em> — writing your own effect would have been impossible without reimplementing the whole machinery. after the experiments done by <a href="http://codecave.org/">Øyvind</a> and <a href="http://blogs.gnome.org/ebassi/2008/05/23/road-to-somewhere">myself</a>, and after looking at what the high-level languages provided, I implemented <strong>a new implicit animation API</strong> — all based around <a href="http://www.clutter-project.org/docs/clutter/unstable/clutter-Implicit-Animations.html">a single object</a>, with the most automagic memory management possible:</p>
<pre>  <span style="color:blue">/* resize the actor in 250 milliseconds using a cubic easing
   * and attach a callback at the end of the animation
   */</span>
  ClutterAnimation *animation =
    clutter_actor_animate (actor, 250, CLUTTER_EASE_IN_CUBIC,
                           <span style="color:red">"width"</span>, 200,
                           <span style="color:red">"height"</span>, 200,
                           <span style="color:red">"color"</span>, &amp;new_color,
                           <span style="color:purple">NULL</span>);
  g_signal_connect (animation, <span style="color:red">"completed"</span>,
                    G_CALLBACK (on_animation_complete),
                    <span style="color:purple">NULL</span>);</pre>
<p>this should make a lot of people happy. the easing modes in particular are the same shared among various animation framworks, like <a href="http://code.google.com/p/tweener/">tweener</a> and <a href="http://jquery.com/">jQuery</a>.</p>
<p>what might make some people <em>slightly less</em> happy is the big API churn that <strong>removed both ClutterLabel and ClutterEntry</strong> and added <strong>ClutterText</strong>. the trade-off, though, is clearly in favour of <a href="http://www.clutter-project.org/docs/clutter/unstable/ClutterText.html">ClutterText</a>, as this is a base class for both editable and non-editable text displays; it supports pointer and keyboard selection, and multi-line as well as single-line editing.</p>
<p>another big changed happened on the low level COGL API, with the introduction of vertex buffers — which allow you to <strong>efficiently store arrays of vertex attributes</strong>; and, more importantly, with the introduction of the <strong>Materials</strong> which <strong>decouple the drawing operations with the fill operations</strong>. it also adds support for multi-texturing, colors and other GL features — on both GL and GLES.</p>
<p><a rel="attachment wp-att-267" href="http://blogs.gnome.org/ebassi/2009/02/20/dream-about-flying/gradient-test/"><img class="aligncenter size-medium wp-image-267" title="Gradients with Clutter" src="http://blogs.gnome.org/ebassi/files/2009/02/gradient-test-300x240.png" alt="Gradients with Clutter" width="300" height="240" /></a></p>
<p>after unifying Label and Entry, we also decided to <strong>unify BehaviourPath and BehaviourBspline</strong>; after that we added support for creating paths using SVG-like descriptions and for &#8220;replaying&#8221; a Path on a <code>cairo_t</code>. well, the <strong>Cairo integration</strong> is also another feature — <strong>clutter-cairo has been deprecated</strong> and its functionality moved inside <strong>ClutterCairoTexture</strong>.</p>
<p>one of the last minute additions has been <a href="http://www.clutter-project.org/docs/clutter/unstable/ClutterClone.html">ClutterClone</a><strong>, an efficient way to clone generic actors without using FBOs</strong> — which also supercedes the CloneTexture actor.</p>
<p>the Pango integration has been extended, and the internal <strong>Pango API exposed and officially supported</strong> — now you can display text using the Pango renderer and glyphs cache inside your own custom actors without using internal/unstable API.</p>
<p>thanks to Johan Dahlin and Owen Taylor, <strong>Clutter now generates GObject-Introspection data</strong> at compile time, so that runtime language bindings will be ready as soon as 1.0.0 hits the internets.</p>
<p>finally, there&#8217;s <strong>a ton of bug fixes</strong> in how we use GL, how we render text, how we relayout actors, etc.</p>
<p>hope you&#8217;ll have fun with Clutter!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2009/02/20/dream-about-flying/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  blogs.gnome.org/ebassi/tag/hacking/feed/ ) in 1.21441 seconds, on Feb 10th, 2012 at 11:05 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 11th, 2012 at 12:05 am UTC -->
