My dear Evolution,

please, please stop the utter madness of not showing email addresses in the to: and cc: fields if they match an entry in the addressbook.

I’m writing an email. therefore it is safe to assume I know what an email address is. you don’t have to shield me from the existence of email addresses, especially if this prevents me from checking that the email I’m sending is effectively directed to the people I intend to, and not to what your brain damaged autocompletion decides to fart in my text entries.

no love,
  Emmanuele.

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!