<?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</title>
	<atom:link href="http://blogs.gnome.org/ebassi/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/ebassi</link>
	<description>I am the man that arranges the blocks</description>
	<lastBuildDate>Sun, 20 May 2012 12:51:19 +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>June Hymn</title>
		<link>http://blogs.gnome.org/ebassi/2012/05/20/june-hymn/</link>
		<comments>http://blogs.gnome.org/ebassi/2012/05/20/june-hymn/#comments</comments>
		<pubDate>Sun, 20 May 2012 12:51:19 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[board]]></category>
		<category><![CDATA[elections]]></category>
		<category><![CDATA[foundation]]></category>
		<category><![CDATA[gnome]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=521</guid>
		<description><![CDATA[today is the deadline for submitting candidacies for the election of the GNOME Board of Directors. I decided to run again this year: it took me a bit to get into the role, but I think I can work with &#8230; <a href="http://blogs.gnome.org/ebassi/2012/05/20/june-hymn/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>today is the deadline for <a href="http://mail.gnome.org/archives/foundation-announce/2012-April/msg00007.html">submitting candidacies</a> for the election of the GNOME Board of Directors.</p>
<p>I decided to run again this year: it took me a bit to get into the role, but I think I can work with the fellow Board members, as well with the rest of the people in GNOME, to ensure the proper functioning of the Foundation now.</p>
<p>remember: being on the Board of Directors doesn&#8217;t mean having a fancy title, or a shot at managing the GNOME project towards a technical goal; it mostly entails providing the means by which the +GNOME project can actually function. without the Board and the Foundation, we could not organize hackfests, or send people to GUADEC, or even have GUADEC.</p>
<p>being a Director is not a <strong>huge</strong> amount of work: a 1hr meeting every two weeks, and at most one hour every day for emails and IRC discussions; but it&#8217;s necessary work, and it makes all the difference between a functioning community that can provide infrastructure to a complex project and a project that can only use public and free services without any guarantee of continuity. imagine not relying on all the services on gnome.org; or imagine not having any funds to organize the successful hackfests we&#8217;ve had in the past few years.</p>
<p>if you are a GNOME foundation member, consider running &#8211; if not for a specific goal, just to help out making GNOME successful in bringing together people to provide a first class software platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2012/05/20/june-hymn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Culling of the Fold</title>
		<link>http://blogs.gnome.org/ebassi/2012/05/04/culling-of-the-fold/</link>
		<comments>http://blogs.gnome.org/ebassi/2012/05/04/culling-of-the-fold/#comments</comments>
		<pubDate>Fri, 04 May 2012 10:48:08 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=519</guid>
		<description><![CDATA[I&#8217;ve received a bunch of questions about the state of the perl-Clutter bindings in the past couple of years; I entertained a vain hope of returning to actively maintaining them, but the effort of actually maintaining the underlying C library &#8230; <a href="http://blogs.gnome.org/ebassi/2012/05/04/culling-of-the-fold/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve received a bunch of questions about the state of the perl-Clutter bindings in the past couple of years; I entertained a vain hope of returning to actively maintaining them, but the effort of actually maintaining the underlying C library left little to no time for bindings (just ask the pyclutter users).</p>
<p>luckily, the stellar work done by Torsten Schönfeld on <a href="http://git.gnome.org/browse/perl-Glib-Object-Introspection">Glib::Object::Introspection</a> allowed me to jump start an introspection-based binding module for Clutter in about half an hour &#8211; including the time spent porting one of the <a href="http://git.gnome.org/browse/clutter/tree/examples/basic-actor.c">examples in the C API reference</a> to <a href="http://git.gnome.org/browse/perl-Clutter/tree/examples/basic-actor.pl">Perl</a>.</p>
<p><a href="http://git.gnome.org/browse/perl-Clutter">perl-Clutter</a> is in git.gnome.org, and it works pretty much like <a href="http://git.gnome.org/browse/perl-Gtk3">perl-Gtk3</a> &mdash; same Dist::Zilla based setup, same dependencies.</p>
<p>contributions are very much welcome &mdash; though I&#8217;ll try to reserve some spare time for going back to the same levels of compatibility as the old, static bindings. one area for new contributors is pure-Perl overrides to paper over the C API; another is writing Cogl bindings, possibly static ones like perl-Cairo, as the Cogl API is not very introspection-friendly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2012/05/04/culling-of-the-fold/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We Heaved Relief as Scores of Innocents Died</title>
		<link>http://blogs.gnome.org/ebassi/2012/03/18/we-heaved-relief-as-scores-of-innocents-died/</link>
		<comments>http://blogs.gnome.org/ebassi/2012/03/18/we-heaved-relief-as-scores-of-innocents-died/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 12:00:41 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clutter]]></category>
		<category><![CDATA[clutter-2.0]]></category>
		<category><![CDATA[post-apocalyptic world building]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=469</guid>
		<description><![CDATA[after all the changes in this series of blogs, and all the big changes I tried to introduce in them, this is mostly a coda &#8212; one in which I just want to mention a couple of new features that &#8230; <a href="http://blogs.gnome.org/ebassi/2012/03/18/we-heaved-relief-as-scores-of-innocents-died/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>after all the changes <a href="http://blogs.gnome.org/ebassi/tag/post-apocalyptic-world-building/" title="All posts tagged: Post-apocalyptic World Building">in this series of blogs</a>, and all the big changes I tried to introduce in them, this is mostly a <em>coda</em> &mdash; one in which I just want to mention a couple of new features that don&#8217;t fall in the previous apocalypses but that I think are interesting nonetheless.</p>
<h3>ClutterTimeline and ClutterAlpha</h3>
<p>the timeline class gained a new property, <em>repeat-count</em> which replaces the venerable <em>loop</em> one; whilst <em>loop</em> would just make the timeline loop indefinitely (until forcibly stopped), <em>repeat-count</em> allows you to set a ceiling to the number of repeats.</p>
<p>another change in the Timeline class is the introduction of the <em>progress-mode</em> property, which allows you to control how the <em>progress</em> property is computed. this effectively deprecates <code>ClutterAlpha</code>, even if the class itself hasn&#8217;t been marked for deprecation (as we still need it for other API).</p>
<p>these two changes hopefully will make using <code>ClutterTimeline</code> a better experience, and remove some custom code.</p>
<h3>Support localizable strings in ClutterScript</h3>
<p>if you currently define UI elements in <code>ClutterScript</code> you&#8217;ll notice that all the strings are not translatable; this is clearly sub-optimal, and prevents people from actually writing proper applications using this format, just like they do with <code>GtkBuilder</code>.</p>
<p>I recently added the ability to describe translatable strings inside the JSON format, using a syntax like:</p>
<pre><code>
  {
    ...
    <span style="color:red">"a-label-property"</span> : {
      <span style="color:red">"translatable"</span> : <span style="color:purple">true</span>,
      <span style="color:red">"string"</span> : <span style="color:red">"A Translatable String"</span>,
      <span style="color:red">"context"</span> : <span style="color:red">"Some Context"</span>,
      <span style="color:red">"domain"</span> : <span style="color:red">"Gettext-Domain"</span>
    },
    ...
  }
</code></pre>
<p>the <em>domain</em> and <em>context</em> members are optional, and allow you to specify a gettext domain and context for a specific string; you can assign a domain to the <code>ClutterScript</code> instance, using <code>clutter_script_set_translation_domain()</code>, or use the Gettext domain specified by the application itself upon initialization with <code>bindtextdomain()</code>.</p>
<p>obviously, this is just a step: the real support for localization can only come after intltool is updated to handle the JSON format used by <code>ClutterScript</code>, to extract the translatable strings and place them into the POT file; this is planned, but it&#8217;s not ready yet.</p>
<h2>see you in 6 months!</h2>
<p>well, I hope you enjoyed this series of blog posts; oh, more accurately: I hope you haven&#8217;t been bored to death by it.</p>
<p>what will happen in six months is, very likely, a 1.12 release of Clutter, with a couple of other Apocalypses landing (a way to animate layout management by using the easing states and transition API instead of the half-aborted animation API inside <code>ClutterLayoutManager</code>; and the <code>ClutterActorModel</code> API, to get rid of the <code>ClutterClone</code>s).</p>
<p>ideally, I&#8217;d really like to have the first 2.0 alpha release at about the same time &mdash; in order to give people the feel of the changes, as well as time to port their applications and start complaining about the missing functionality <em>while I can still add, change, or remove API</em>. what&#8217;s certain is that between 6 and 12 months I want to have Clutter 2.0 out of the door and into your systems; whether or not that will happen sooner or later it entirely depends on the time I&#8217;ll be able to spend on it, as well as the contributions I may receive. so, if I have to close with a familiar exhortation: <strong>patches welcome</strong>!</p>
<p>until then, <strong>have fun with Clutter!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2012/03/18/we-heaved-relief-as-scores-of-innocents-died/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>And I Believe California Succumbed to the Fault Line</title>
		<link>http://blogs.gnome.org/ebassi/2012/03/18/and-i-believe-california-succumbed-to-the-fault-line/</link>
		<comments>http://blogs.gnome.org/ebassi/2012/03/18/and-i-believe-california-succumbed-to-the-fault-line/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 06:00:31 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clutter]]></category>
		<category><![CDATA[clutter-2.0]]></category>
		<category><![CDATA[post-apocalyptic world building]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=458</guid>
		<description><![CDATA[Clutter&#8217;s description, and I quote from the website, is: an open source software library for creating fast, compelling, portable, and dynamic graphical user interfaces. and yet, the API to build a user interface is static: you create the actor tree, &#8230; <a href="http://blogs.gnome.org/ebassi/2012/03/18/and-i-believe-california-succumbed-to-the-fault-line/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Clutter&#8217;s description, and I quote from <a href="http://www.clutter-project.org">the website</a>, is:</p>
<blockquote><p>an open source software library for creating fast, compelling, portable, and dynamic graphical user interfaces.</p></blockquote>
<p>and yet, the API to build a user interface is static: you create the actor tree, you tell it how to paint its contents, and only <strong>then</strong> you animate it to create a compelling and dynamic result.</p>
<p><a href="http://blogs.gnome.org/ebassi/files/2012/03/wat_o_84572.jpg"><img src="http://blogs.gnome.org/ebassi/files/2012/03/wat_o_84572.jpg" alt="" width="500" height="397" class="aligncenter size-full wp-image-459" /></a></p>
<p>the <em>ethos</em> of an API should be to Do The Right Thing™ by default &mdash; and make it harder if not impossible to Do The Wrong Thing™ &mdash; so why is it that you have <a href="http://developer.gnome.org/clutter/unstable/ClutterActor.html#clutter-actor-set-position" title="clutter_actor_set_position() - ClutterActor API reference">a simple function</a> to make an actor jump at a given position, and you have <a href="http://developer.gnome.org/clutter/unstable/clutter-Implicit-Animations.html#clutter-actor-animate" title="clutter_actor_animate() - Clutter API reference">a really complex function</a>, full of side-effects and options, to make an actor tween between the current position and the desired new one?</p>
<p><a href="http://blogs.gnome.org/ebassi/files/2012/03/16468333.jpg"><img src="http://blogs.gnome.org/ebassi/files/2012/03/16468333.jpg" alt="Scumbag Steve meme - top caption says: &quot;Promises dynamic user interfaces&quot;, bottom caption says: &quot;makes everything static by default&quot;" width="400" height="402" class="aligncenter size-full wp-image-479" /></a></p>
<p>wouldn&#8217;t it be better, and even easier, if the simple function did the tweening, and if the complex function just went away because, well: who needs it, anyway?</p>
<p>so we need to identify properties that <em>should</em> be animated when changed, and we have to make every setter for that property perform a transition from the current value to the desired value, using a predefined duration (that can be changed), and a predefined easing mode (that can be changed). easy, right?</p>
<p>well, sort of. we already have all the pieces in place: we have the <a href="http://developer.gnome.org/clutter/unstable/ClutterTimeline.html" title="ClutterTimeline API reference">timeline</a>, to define the duration and progress of a transition; we have the <a href="http://developer.gnome.org/clutter/unstable/clutter-Value-intervals.html" title="ClutterInterval API reference">interval</a>, to define the initial and final states, as well as the interpolation between the two; and we have the introspection capabilities of GObject to determine whether a property can be animated, and how. all we need to do is connect the dots inside <code>ClutterActor</code>. hence, the introduction of <code>ClutterTransition</code> and of the <em>easing state</em>. the former is a simplified version of <code>ClutterAnimation</code>, that ties a <code>ClutterInterval</code> directly into a <code>ClutterTimeline</code> to avoid signal emissions and weird memory management rules; the latter is a way of describing the duration, delay, and easing mode of all subsequent transitions. Clutter will manage everything behind the scenes for you, so you just need to tell it how long, and how paced, are your transitions.</p>
<p>so, in short, this call:</p>
<pre><code>
  clutter_actor_animate (actor, CLUTTER_EASE_OUT_CUBIC, <span style="color:purple">250</span>,
                         <span style="color:red">"x"</span>, <span style="color:purple">100.0</span>,
                         <span style="color:red">"y"</span>, <span style="color:purple">100.0</span>,
                         <span style="color:red">"width"</span>, <span style="color:purple">200.0</span>,
                         <span style="color:red">"height"</span>, <span style="color:purple">200.0</span>,
                         <span style="color:purple">NULL</span>);
</code></pre>
<p>becomes:</p>
<pre><code>
  clutter_actor_save_easing_state (actor);
  clutter_actor_set_easing_mode (actor, CLUTTER_EASE_OUT_CUBIC);
  clutter_actor_set_easing_duration (actor, <span style="color:purple">250</span>);
  clutter_actor_set_position (actor, <span style="color:purple">100</span>, <span style="color:purple">100</span>);
  clutter_actor_set_size (actor, <span style="color:purple">200</span>, <span style="color:purple">200</span>);
  clutter_actor_restore_easing_state (actor);
</code></pre>
<p>which does not seem much, but:</p>
<ul>
<li>you get back all the type safety you need;</li>
<li>the code becomes easy to follow;</li>
<li>you can use the convenience API instead of a per-property set.</li>
</ul>
<p>for instance, try throwing things like scaling or rotating:</p>
<pre><code>
  ClutterVertex vertex = CLUTTER_VERTEX_INIT (x, y, z);

  clutter_actor_animate (actor, CLUTTER_EASE_OUT_CUBIC, <span style="color:purple">250</span>,
                         <span style="color:red">"rotation-angle-y"</span>, <span style="color:purple">360.0</span>,
                         <span style="color:red">"fixed:rotation-center-y"</span>, &amp;vertex,
                         <span style="color:red">"scale-x"</span>, <span style="color:purple">2.0</span>,
                         <span style="color:red">"scale-y"</span>, <span style="color:purple">2.0</span>,
                         <span style="color:red">"fixed:scale-gravity"</span>, CLUTTER_GRAVITY_CENTER,
                         <span style="color:purple">NULL</span>);
</code></pre>
<p>becomes the much more familiar:</p>
<pre><code>
  clutter_actor_save_easing_state (actor);
  clutter_actor_set_scale_with_gravity (actor, <span style="color:purple">2.0</span>, <span style="color:purple">2.0</span>, CLUTTER_GRAVITY_CENTER);
  clutter_actor_set_rotation (actor, CLUTTER_Y_AXIS, <span style="color:purple">360.0</span>, x, y, z);
  clutter_actor_restore_easing_state (actor);
</code></pre>
<p>well, I cheated a bit: the easing mode of <code>CLUTTER_EASE_OUT_CUBIC</code> and the easing duration of 250 milliseconds are the default when creating a new easing state &mdash; but that&#8217;s just another benefit: you don&#8217;t need to specify an easing mode and a duration if you want to use the sensible defaults, whereas <code>clutter_actor_animate()</code> forces you to do that every time.</p>
<h3>job done!</h3>
<p><a href="http://blogs.gnome.org/ebassi/files/2012/03/darth_wat_grande.jpg"><img src="http://blogs.gnome.org/ebassi/files/2012/03/darth_wat_grande.jpg" alt="Darth Vader filling a jug with water filtered from the sea" width="400" height="421" class="aligncenter size-full wp-image-460" /></a></p>
<p>we still don&#8217;t want existing Clutter applications to change behaviour and start animating <strong>everything</strong> just because you updated Clutter from 1.8 to 1.10; for this reason, all actors start off with an easing state with a duration of zero milliseconds &mdash; which means that all transitions happen immediately. at least, this will be true for the 1.x API series: for 2.x, the initial easing state will have a non-zero duration, which means that if you want to make an actor jump at a specified state then you&#8217;ll have to begin a zero-milliseconds duration.</p>
<h3>well, kind of</h3>
<p><a href="http://blogs.gnome.org/ebassi/files/2012/03/16462863.jpg"><img src="http://blogs.gnome.org/ebassi/files/2012/03/16462863.jpg" alt="Success Kid Meme image; top caption is: &quot;Follows API ethos&quot;, bottom caption is: &quot;Makes the World Better&quot;" width="400" height="400" class="aligncenter size-full wp-image-463" /></a></p>
<p>it&#8217;s important to make sure that every time you want to change a user interface you think of it as an animation; this API should immediately give you have a visual feedback of what that change is going to provide &mdash; without structuring your code around lots of variadic argument functions, with pretty loose type checking and &#8220;interesting&#8221; corner cases.</p>
<p>so, for the 1.10 cycle you should start opting in into this way of writing your application, and use easing states instead of using <code>clutter_actor_animate()</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2012/03/18/and-i-believe-california-succumbed-to-the-fault-line/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>You and Me and The War at The End Times</title>
		<link>http://blogs.gnome.org/ebassi/2012/03/18/you-and-me-and-the-war-at-the-end-times/</link>
		<comments>http://blogs.gnome.org/ebassi/2012/03/18/you-and-me-and-the-war-at-the-end-times/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 00:00:09 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clutter]]></category>
		<category><![CDATA[clutter-2.0]]></category>
		<category><![CDATA[post-apocalyptic world building]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=454</guid>
		<description><![CDATA[the actor tree is only the representation of what your user interface is composed of: textures, reactive items, containers to give them structure. if nothing is painted, though, it&#8217;s not much of a user interface. with the current stable version &#8230; <a href="http://blogs.gnome.org/ebassi/2012/03/18/you-and-me-and-the-war-at-the-end-times/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>the actor tree is only the representation of what your user interface is composed of: textures, reactive items, containers to give them structure. if nothing is painted, though, it&#8217;s not much of a user interface.</p>
<p>with the current stable version of Clutter, if you want to get something on the screen you either use one of the pre-canned sub-classes of <code>ClutterActor</code> provided by Clutter itself &mdash; <code>ClutterTexture</code>, <code>ClutterRectangle</code>, and <code>ClutterCairoTexture</code> &mdash; or you end up using something written outside of Clutter &mdash; Mx widgets, for instance; or you write your own UI elements. if you chose to write something from scratch, you will have to sub-class <code>ClutterActor</code> and override the <code><a href="http://developer.gnome.org/clutter/unstable/ClutterActor.html#ClutterActor-paint">ClutterActor::paint</a></code> virtual function.<sup><a href="http://blogs.gnome.org/ebassi/2012/03/18/you-and-me-and-the-war-at-the-end-times/#footnote_0_454" id="identifier_0_454" class="footnote-link footnote-identifier-link" title="yes, it&amp;#8217;s a signal, which means that you can also attach a handler to an existing actor and completely change how said actor paints itself; this is incredibly evil, and will not be possible in 2.0, so if you&amp;#8217;re doing that, stop right now, or I will tell mom, and you won&amp;#8217;t be invited to the Buffy marathon next time.">1</a></sup></p>
<p>what happens inside a paint virtual function implementation is usually this:</p>
<ul>
<li>you use Cogl API to set up the state of the graphics pipeline;</li>
<li>you use Cogl API to submit geometry to the graphics pipeline;</li>
<li>you recursively call <code>clutter_actor_paint()</code> on your children, if any.</li>
</ul>
<p>the third step can now be taken care of Clutter itself, as any actor now has access to the section of the actor tree with itself as the local root. the first and second steps are kind of tricky: you have to remember a lot of things about how to use the Cogl API. it would be nice if Clutter provided some convenience API to Do The Right Thing™ instead.</p>
<p>it would also be nicer if we could structure that API to build a representation of an entire frame, decoupling <em>what gets painted</em> from <em>what is the logical unit of the user interface</em>, because then we could keep it (either as parts or the entire thing) around between frames, manipulating the former without affecting the latter. the keen readers will already have said: <em>you want a retained drawing model</em>. good job! ten points for Gryffindor!</p>
<p>this new API is provided by <em>paint nodes</em>; each paint node is an element on the render tree &mdash; and every time you should paint an actor, you get passed a local root that you can use to attach your nodes. each paint node contains the pipeline state and the geometry to submit. once the tree has been built, Clutter will decide how to paint it. the base entry point for this operation is the <code>ClutterActor::paint_node()</code> virtual function. inside it, you&#8217;re supposed to paint only the actor &mdash; the children will be painted by Clutter itself. the <code>paint_node()</code> virtual should be considered orthogonal to the <code>paint()</code> one, though the latter will probably remain in 2.0 to give you control over which of your children you may decide to paint. Clutter provides predefined paint nodes for texture, solid colors, text, and even for custom pipelines; to each node you can add a rectangle (with or without texture coordinates), paths, or even Cogl primitive objects if you decide to use the experimental Cogl 2.0 API.</p>
<p>currently, given that we allow app and toolkit developers to use a direct drawing model, we still need to maintain that invariant, otherwise stuff <strong>will break</strong>; but we can already start migrating towards a retained drawing model, and have it fully in place by the time we hit 2.0. instead of setting up all the transformations and modifying the modelview and clip states, we&#8217;ll be able to attach transformation and clip nodes, and even be able to discard sections of the render tree without hitting the GPU. from there, we could go <strong>anywhere</strong>; we could hand off rendering into a separate thread and never block the main loop; or we could do the reverse, and thread everything else instead &mdash; event processing, layouting &mdash; without having application code left to deal with the fact that only one thread at a time can access a GL context.</p>
<p>obviously, most developers will not want to care about this; apps usually draw textures and text anyway, fancy as they may be. app developers should get a better API to achieve that, though, and the current model of sub-classes of <code>ClutterActor</code> is not serving them well enough; if you sub-class <code>ClutterTexture</code> you get a ton of behaviours, and most of them are really not at all nice, especially if all you want was to get some image data on the screen. I won&#8217;t even speak about <code>ClutterCairoTexture</code>, which encodes an implementation detail (that is not even true nowadays) into the class structure.</p>
<p>so, for 1.10 I introduced the <code>ClutterContent</code> interface, and a couple of trivial implementations for displaying image data and for drawing using Cairo. the classes are side-effect-free because they only know about one thing: painting some state. implementing a <code>ClutterContent</code> to paint something custom is easier than sub-classing <code>ClutterActor</code>, just like it&#8217;s easier to implement a <code>ClutterLayoutManager</code> to manage the layout policy of the children of an actor. all the cleverness on where and when to paint the content associated to an actor is where it belongs: inside the actor itself, leaving you to care just about what to paint.</p>
<ol class="footnotes"><li id="footnote_0_454" class="footnote">yes, it&#8217;s a signal, which means that you can also attach a handler to an existing actor and completely change how said actor paints itself; this is incredibly evil, and will not be possible in 2.0, so if you&#8217;re doing that, stop <strong>right now</strong>, or I will tell mom, and you won&#8217;t be invited to the Buffy marathon next time.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2012/03/18/you-and-me-and-the-war-at-the-end-times/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Had a dream</title>
		<link>http://blogs.gnome.org/ebassi/2012/03/17/had-a-dream/</link>
		<comments>http://blogs.gnome.org/ebassi/2012/03/17/had-a-dream/#comments</comments>
		<pubDate>Sat, 17 Mar 2012 18:00:24 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clutter]]></category>
		<category><![CDATA[clutter-2.0]]></category>
		<category><![CDATA[post-apocalyptic world building]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=451</guid>
		<description><![CDATA[as I wrote already in a previous blog post, if you try and compile an existing Clutter application with the current master, the first thing you will notice is that the compiler will start complaining about deprecated symbols. a lot. &#8230; <a href="http://blogs.gnome.org/ebassi/2012/03/17/had-a-dream/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>as I wrote already <a href="http://blogs.gnome.org/ebassi/2012/02/16/bridges-and-balloons/" title="Context Switch: Bridges and Balloons">in a previous blog post</a>, if you try and compile an existing Clutter application with the current master, the first thing you will notice is that the compiler will start complaining about deprecated symbols.</p>
<p>a lot.</p>
<p>some of these symbols are little used API variants, or baggage we&#8217;ve been stringing along since the 0.x days and that we never managed to deprecate until now — and if you&#8217;ve been using them, then I&#8217;m not sure I want to know why, and you&#8217;ll have to trust me when I say that you&#8217;re better off <strong>not</strong> using them.</p>
<p>on the other hand, many of the deprecated symbols have been pretty central as to how a Clutter app is built and works; <code>clutter_container_add_actor()</code>? <code>clutter_actor_raise()</code>? <code>ClutterBox</code>? <code>clutter_timeline_set_loop()</code>?</p>
<p>in reality, not much has changed <em>per se</em>: the deprecation warnings will tell you how to port an app from the old API to the new one, and in basically all cases it&#8217;s juts a matter of changing functions or classes; plus, deprecated classes and functions will still work until we break API and release Clutter 2.0.</p>
<p>what really changed is how a Clutter app should be written from the get go — and this has more to do with the <em>intent</em> of the API, more than the actual <em>form</em> of the API.</p>
<p>case in point: if you look at the replacement for many of the deprecated functionality, as well as the new API introduced in 1.10, you will notice that it is overwhelmingly inside the ClutterActor class; the 1.9 development cycle stats for the clutter-actor.[ch] files alone are:</p>
<pre><code>
 git diff --stat clutter-1.8... clutter/clutter-actor.[ch]
 clutter/clutter-actor.c |20516 +++++++++++++++++++++++++++++------------------
 clutter/clutter-actor.h |  803 +-
 2 files changed, 13350 insertions(+), 7969 deletions(-)
</code></pre>
<p>so ClutterActor just gained around 5000 lines<sup><a href="http://blogs.gnome.org/ebassi/2012/03/17/had-a-dream/#footnote_0_451" id="identifier_0_451" class="footnote-link footnote-identifier-link" title="yes, I&amp;#8217;m cheating a little bit, as a lot of documentation is inlined inside the source code, so that balloons the size of the delta">1</a></sup>.</p>
<p>this growth reflects one of the fundamental tenets of how Clutter should be used:</p>
<h4>it&#8217;s all about actors</h4>
<p>Actors are not the base, abstract class for elements on the UI: they are now a <em>concrete</em> class that should be used directly, instead of through sub-classes. the ClutterActor class is <strong>the</strong> element of the scene graph; it holds children, it paints them, it lays them out. there is one API to learn, one class that holds the keys to all the behaviour, and one class to inherit from for custom controls.</p>
<p>obviously, ClutterActor cannot do everything by itself; but instead of creating sub-classes to specialize the behaviour right within Clutter, a delegation pattern was preferred. layout is now deferred to ClutterLayoutManager; painting is delegated to ClutterContent.</p>
<p>delegation means that composition is the approach for creating apps; Clutter is, now more than ever, like a set of blocks that can be composed together to achieve a compelling, dynamic user interface.</p>
<p>let&#8217;s start from an actual example: whereas until 1.8 you had to use the <code>ClutterContainer</code> interface as the public side for building and manipulating the actor tree, now ClutterActor owns the entire list of public entry points for adding, removing, and iterating children; this also applies to the implementation of container actors: the <code>ClutterContainer</code> interface is implemented directly by the <code>ClutterActor</code> class, so you can just subclass the latter and use the default implementation without having to care about internal children, or memory management, or mapping and unmapping. even painting and picking by default will do the right thing &mdash; so you don&#8217;t have to care any more. when you subclass the <code>ClutterActor</code> class you can now concentrate only on the things your class has to do &mdash; instead of having to care about Clutter internals.</p>
<p>moving all the API from within the containers to the actors also meant being able to add a bunch of convenience functions for manipulating and iterating the actor tree; usually, these functions had to be provided by container classes, and thus had to be re-implemented over, and over, and over again. now, instead, you can get the <a href="http://developer.gnome.org/clutter/unstable/ClutterActor.html#clutter-actor-get-first-child">first</a> and <a href="http://developer.gnome.org/clutter/unstable/ClutterActor.html#clutter-actor-get-last-child">last</a> child of an actor, and iterate over their siblings; or you can create a simple, <a href="http://developer.gnome.org/clutter/unstable/ClutterActor.html#ClutterActorIter">stack allocated iterator structure</a>, and safely iterate over the children of an actor. you can <a href="http://developer.gnome.org/clutter/unstable/ClutterActor.html#clutter-actor-insert-child-at-index">insert actors at a specific index</a> in the paint and allocation sequence, or you can <a href="http://developer.gnome.org/clutter/unstable/ClutterActor.html#clutter-actor-replace-child">replace a child</a> atomically. finally, you can <a href="http://developer.gnome.org/clutter/unstable/ClutterActor.html#clutter-actor-remove-all-children">remove</a>, or <a href="http://developer.gnome.org/clutter/unstable/ClutterActor.html#clutter-actor-destroy-all-children">destroy</a>, all the children of an actor in one fell swoop.</p>
<p>implementing the Container interface inside <code>ClutterActor</code> also allowed us to seamlessly migrate the <code><a href="http://developer.gnome.org/clutter/unstable/ClutterLayoutManager.html">ClutterLayoutManager</a></code> delegate over to <code>ClutterActor</code>; this means that every actor can now delegate the layout of its children to any layout manager without requiring weird incantations.<sup><a href="http://blogs.gnome.org/ebassi/2012/03/17/had-a-dream/#footnote_1_451" id="identifier_1_451" class="footnote-link footnote-identifier-link" title="the layout manager API still needs some adaptations, which will come in the 1.12 time frame">2</a></sup></p>
<p>building the actor tree, though, it&#8217;s just part of the job of creating a Clutter app; we&#8217;ll see in the next blog post what changes happened when you want to fill an app with content&#8230;</p>
<ol class="footnotes"><li id="footnote_0_451" class="footnote">yes, I&#8217;m cheating a little bit, as a lot of documentation is inlined inside the source code, so that balloons the size of the delta</li><li id="footnote_1_451" class="footnote">the layout manager API still needs some adaptations, which will come in the 1.12 time frame</li></ol>]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2012/03/17/had-a-dream/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Calamity Song</title>
		<link>http://blogs.gnome.org/ebassi/2012/03/17/calamity-song/</link>
		<comments>http://blogs.gnome.org/ebassi/2012/03/17/calamity-song/#comments</comments>
		<pubDate>Sat, 17 Mar 2012 17:13:45 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[clutter]]></category>
		<category><![CDATA[clutter-2.0]]></category>
		<category><![CDATA[post-apocalyptic world building]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=496</guid>
		<description><![CDATA[I have written a bunch of blog posts about the Clutter Apocalypses that have landed in Git, as well as how I see the Clutter API evolving after this cycle and towards the 2.0 API break; they should appear in &#8230; <a href="http://blogs.gnome.org/ebassi/2012/03/17/calamity-song/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have written a bunch of blog posts about the Clutter <a href="http://wiki.clutter-project.org/wiki/Clutter/Apocalypses">Apocalypses</a> that have landed in Git, as well as how I see the Clutter API evolving after this cycle and towards the 2.0 API break; they should appear in the next few hours, staggered a bit to avoid clogging the intertubes.</p>
<p>hopefully, I won&#8217;t bore you to death &mdash; but I&#8217;ll understand if you want to filter me out.</p>
<p>I&#8217;ll keep the comments section open, but feel free to use <a href="http://lists.clutter-project.org/listinfo/clutter-devel-list">the clutter-devel mailing list</a>: it&#8217;s much, much better than a comment in a blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2012/03/17/calamity-song/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>From my Own True Love (Lost at Sea)</title>
		<link>http://blogs.gnome.org/ebassi/2012/02/19/from-my-own-true-love-lost-at-sea/</link>
		<comments>http://blogs.gnome.org/ebassi/2012/02/19/from-my-own-true-love-lost-at-sea/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 16:57:19 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2012]]></category>
		<category><![CDATA[brno]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[hackfest]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=444</guid>
		<description><![CDATA[Third day of the GTK hackfest. They have taken the bridge and the second hall. We have barred the gates but cannot hold them for long. The ground shakes, drums&#8230; drums in the deep. We cannot get out. A shadow &#8230; <a href="http://blogs.gnome.org/ebassi/2012/02/19/from-my-own-true-love-lost-at-sea/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>Third day of the GTK hackfest. They have taken the bridge and the second hall. We have barred the gates but cannot hold them for long. The ground shakes, drums&#8230; drums in the deep. We cannot get out. A shadow lurks in the dark. We can not get out&#8230; they are coming.</em></p>
<p>today, the topics discussed were two:</p>
<ul>
<li><strong>Clutter</strong> &mdash; <a href="http://blogs.gnome.org/otte/">Benjamin</a>, <a href="http://blogs.gnome.org/mclasen/">Matthias</a>, and I discussed how to integrate Clutter with GTK in the future. the plan that is shaping up is to hollow out GtkWidget and make it the minimal <em>semantic unit</em> of the structure of an application; a button, a combo box, a text entry, etc. each widget would then be composed of internal elements &mdash; the background and the text for a button; the icons, the progress bar, and the text, for an entry, and so on, and so forth. each element maps the CSS box model (as far as it makes sense), and it&#8217;s backed by a ClutterActor. layout management of each element, and rendering, is deferred to Clutter. so, each GtkWidget has-a ClutterActor, that you can also access to use Clutter directly. implementing a GtkWidget would then be simplified to actually building the structure that has to be rendered, drawing with Cairo on provided surfaces if you have custom content instead of primitives like texture data or text, thus leaving the rest to the scene graph underneath. while this is not a radical change in how GTK+ works, we&#8217;re definitely considering bumping to the 4.0 API version &mdash; this time it wouldn&#8217;t be such a quantum leap like it has been for the 2.x to 3.x transition. all this work depends on the Clutter 2.0 effort, which will take the bulk of the next cycle for me. hopefully, with a little help, we&#8217;ll be able to do a GTK+ 4.0 in 12 months.</li>
<li><strong>design</strong> &mdash; after lunch, we all sat down with the GNOME designers, and talked about the direction for the toolkit, especially with regards to enabling touch on widgets, and adding more widgets that are touch-oriented to be used when designing applications for touchscreen environments. we also discussed a lot about themeing, and how app developers should use or depend on themes like they do on ABI. then we went through <a href="https://live.gnome.org/GnomeOS/Design/Whiteboards">the design whiteboards</a> section of the wiki to see what tasks involve the toolkit &mdash; like printing, notification, selection, and content selection.</li>
</ul>
<p>all in all, it was a very productive day; we&#8217;re churning through the agenda points at a fairly good pace, and hopefully we&#8217;ll soon be able to work on all the areas that have been identified, in order to make GNOME rock.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2012/02/19/from-my-own-true-love-lost-at-sea/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An Interlude</title>
		<link>http://blogs.gnome.org/ebassi/2012/02/18/an-interlude/</link>
		<comments>http://blogs.gnome.org/ebassi/2012/02/18/an-interlude/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 17:04:05 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=439</guid>
		<description><![CDATA[today I spent the morning at the Developer Conference: Matthias had an interesting talk on the changes that happened in GTK+ 3.x over the past year, as well as his experience in implementing the new GtkColorChooser after the design proposals. &#8230; <a href="http://blogs.gnome.org/ebassi/2012/02/18/an-interlude/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>today I spent the morning at the Developer Conference: <a href="http://blogs.gnome.org/mclasen/">Matthias</a> had an interesting talk on the changes that happened in GTK+ 3.x over the past year, as well as his experience in implementing the new <code>GtkColorChooser</code> after <a href="https://live.gnome.org/GnomeOS/Design/Whiteboards/ColorSelection">the design proposals</a>.</p>
<p>then it was <strong>multi-touch</strong> time. after a recap of what happens on different platforms and different toolkits, we discussed and reviewed the API proposed and implemented by <a href="http://blogs.gnome.org/carlosg/">Carlos Garnacho</a>; after a quick break for a late lunch at 4pm, the discussion resumed — it&#8217;s actually still going on to this very moment: Chase, Benjamin, and Matthias are now discussing about event controllers and gesture recognisers — and how to design event handling in the Brave New World® of touch events and gestures.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2012/02/18/an-interlude/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Youth and Beauty Brigade</title>
		<link>http://blogs.gnome.org/ebassi/2012/02/17/youth-and-beauty-brigade/</link>
		<comments>http://blogs.gnome.org/ebassi/2012/02/17/youth-and-beauty-brigade/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 17:53:19 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2012]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[hackfest]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=441</guid>
		<description><![CDATA[first day of the GTK+ Hackfest. while we waited for various participants to arrive, discussions started on a couple of topics: accessibility — Benjamin reported on the various discussions and deliberations that happened during the latest Accessibility Hackfest; what we &#8230; <a href="http://blogs.gnome.org/ebassi/2012/02/17/youth-and-beauty-brigade/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>first day of the <a href="https://live.gnome.org/Hackfests/GtkBrno2012">GTK+ Hackfest</a>.</p>
<p>while we waited for various participants to arrive, discussions started on a couple of topics:</p>
<ul>
<li><strong>accessibility</strong> — Benjamin reported on the various discussions and deliberations that happened during the latest Accessibility Hackfest; what we want to achieve is a state in which the accessibility team has fewer headaches working around issues in the toolkit, and can instead work on the toolkit itself. there is also a question of what kind of API to expose to application developers, not just for people writing AT apps, but also for people writing UI testing suites.</li>
<li><strong>multi-touch</strong> — Chase, Benjamin, Ryan, and occasionally myself, caught up a bit on the overall issues of what kind of API to expose from GTK+ to applications, and what kind of approaches we should be using internally. the bulk of the discussion will resume either this evening, where alcohol will be involved in making them long and very much detailed; or tomorrow, where hangover will keep them focused and short.</li>
</ul>
<p>plus, people were really interested in the correctness of the regular expression on <a href="http://www.thinkgeek.com/tshirts-apparel/unisex/itdepartment/57f0/?srp=1">my tee</a>, which was initially amusing, up until the point a whiteboard and a state machine were involved. occupational hazards, I guess.</p>
<p><em>I also want to point out that at no point knives, or other weaponry, was involved in the various discussions.</em></p>
<p>I&#8217;d like to thank Red Hat (and the Red Hat office in Brno) for offering the conference room for the hackfest.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2012/02/17/youth-and-beauty-brigade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  blogs.gnome.org/ebassi/feed/ ) in 0.45158 seconds, on May 22nd, 2012 at 4:13 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on May 22nd, 2012 at 5:13 pm UTC -->
