A Year of Clutter

so, GUADEC/GCDS is now halfway through, and it’s been a pretty cool conference so far. obviously, lots of talks and loads of people to meet and to talk to.

Rob did a roundup of the talks that the Intel/Moblin contingent has done and will do here.

yesterday, like Josh and Rob ((also known as “the yummy Rob Bradford”)), I had my talk on a technology used by Moblin and that can be (or are already) shared with the GNOME Mobile and Desktop platforms.

I talked about Clutter and the 1.0 release; what does it mean, what will be the future direction and some of the highlights of the Clutter library in its current state. instead of using my 30 minutes to do a big talk, I decided to split them into four, five minutes lightning talks, plus an introduction and a conclusion (still five minutes each). I think it worked out pretty well, given the feedback, and I had much more fun while writing it and while delivering it. I’ll put it online on the moblin.org website as soon as the network connection I have access to gets more reliable.

other talks worth of mention: obviously, the gnome-shell and the zeitgest ones, and alexl’s client-side-windows talk. great work by everyone involved — you are all my heroes.

The Wanting Comes in Waves

so, we’re finally free to show what we’ve been doing for the past six months:

it’s been a great ride — and it’s just getting started. we’ve been pushing Clutter forward and center of an entire platform user experience, and it was up to to the task to a degree that excited me, and made me incredibly proud.

the Moblin 2.0 UI is also one of the reasons we delayed the 1.0 release — the other being that we wanted to be confident in the API, since we’re going to be committing to it for the next two to three years. the wait is almost over: we’re planning a 1.0 release of Clutter by the end of May ((hopefully, it’ll all be fixed by that time :-) )). prepare yourself to have muchy more fun with Clutter!

Dream About Flying

as usual — long time, no blog.

my only excuse is that I was busy with other things: new job, new office, holidays… you know, whatever happens between coding. :-)

it’s that time of year again, and we’re nearing another Clutter release — this time it’s a special one, though, as it is 1.0.0. 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’ll take at least a couple of years to get there)).

since we’re in the process of finalizing the 1.0 API I thought about writing something about what changed, what was added and what has been removed for good.

let’s start with the Effects API. the Effects were meant to provide a high level API for simple, fire-and-forget animations ((even though people always tried to find new ways to abuse the term “fire-and-forget”)). they were sub-obtimal in the memory management — you had to keep around the EffectTemplate, the effects copied the timelines — and they weren’t extensible — writing your own effect would have been impossible without reimplementing the whole machinery. after the experiments done by Øyvind and myself, and after looking at what the high-level languages provided, I implemented a new implicit animation API — all based around a single object, with the most automagic memory management possible:

  /* resize the actor in 250 milliseconds using a cubic easing
   * and attach a callback at the end of the animation
   */
  ClutterAnimation *animation =
    clutter_actor_animate (actor, 250, CLUTTER_EASE_IN_CUBIC,
                           "width", 200,
                           "height", 200,
                           "color", &new_color,
                           NULL);
  g_signal_connect (animation, "completed",
                    G_CALLBACK (on_animation_complete),
                    NULL);

this should make a lot of people happy. the easing modes in particular are the same shared among various animation framworks, like tweener and jQuery.

what might make some people slightly less happy is the big API churn that removed both ClutterLabel and ClutterEntry and added ClutterText. the trade-off, though, is clearly in favour of ClutterText, 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.

another big changed happened on the low level COGL API, with the introduction of vertex buffers — which allow you to efficiently store arrays of vertex attributes; and, more importantly, with the introduction of the Materials which decouple the drawing operations with the fill operations. it also adds support for multi-texturing, colors and other GL features — on both GL and GLES.

Gradients with Clutter

after unifying Label and Entry, we also decided to unify BehaviourPath and BehaviourBspline; after that we added support for creating paths using SVG-like descriptions and for “replaying” a Path on a cairo_t. well, the Cairo integration is also another feature — clutter-cairo has been deprecated and its functionality moved inside ClutterCairoTexture.

one of the last minute additions has been ClutterClone, an efficient way to clone generic actors without using FBOs — which also supercedes the CloneTexture actor.

the Pango integration has been extended, and the internal Pango API exposed and officially supported — now you can display text using the Pango renderer and glyphs cache inside your own custom actors without using internal/unstable API.

thanks to Johan Dahlin and Owen Taylor, Clutter now generates GObject-Introspection data at compile time, so that runtime language bindings will be ready as soon as 1.0.0 hits the internets.

finally, there’s a ton of bug fixes in how we use GL, how we render text, how we relayout actors, etc.

hope you’ll have fun with Clutter!

Paint the Silence/3: Gran Finale

the third and final installment of the ongoing saga

thanks to Damien, I finally found a way to shut up libtool and get a clean output for the build of a project: shave.

Clutter is the first project using it, and I already easily caught compiler warnings ((even without using the anal-retentive compiler flags and -Werror)) because my terminal is not full of crappy, four lines long incantations ((and even though I’m not an autotools ninja, at least I read the documentation and not just blindly copy stuff from various projects in the hope they work; so the autotools setup in Clutter is pretty much well tested so that I don’t need to worry that files get installed in a different location than expected)).

big kudos to Damien!