just landed in Berlin, for the GTK+ Hackfest. At the moment, I’m hanging out in the dbus/gsettings/gdata/gtkapplication room with desrt, MacSlow, gicmo, chpe and herzi waiting for somebody (and I’m looking at you, behdad) with a key for my room to get in.
Let It Take You
Murray, just a short reply to your points:
I sometimes feel I’d like to just put actors on a rail, twist that rail about, connect some actors together with struts or springs, start them moving, let the user push and pull them around within constraints, and trigger extra behaviour when they reach certain positions, or reach each other.
What you want is a physics engine hooked up into Clutter; it’s possible, Pippin has been doing some preliminary work on it, and it would solve the more “physical” interaction model. But it’s not always what you want your UI to look like and it’s not always a good model to employ, especially if you cannot interact physically with the UI – like shaking it, rotating it, use multi-touch surfaces.
Clutter is now a very basic API.
You make it sound like it’s a bad thing. Well, it’s not: it’s exactly what we want it to be like. No constraints on the UI structure or behaviour — those belong to toolkits developed on top of Clutter. Like Tidy, which is a shared library (it even installs a pkg-config file), but it will not be released as a tarball because we’d like to keep it as an experimental ground, read: breaking stuff, to see how and what should Clutter provide to implement an accelerated and animated toolkit. Also, as you note, in embedded environments you’ll want to style and create your entire stack: instead of raping and twisting GTK+ themeing until you don’t know that you’re using GTK+ anymore — and losing a lot of time in the process — you can use a standard low level API and develop your toolkit on top of it. It’s not optimal, but I think it’s a step in the right direction to make the GNOME mobile stack a lot more useful and flexible.
Neither you or Clutter should want to reimplement the huge amount of UI logic that is, for instance, in GTK+
That is why you can embed Clutter inside a GTK+ application, and hopefully you’ll soon be able to embed GTK+ widgets inside Clutter.
In short: Clutter was never meant or designed or developed to be a complete replacement for GTK+ on the desktop. On the desktop is an API for allowing hardware accelerated UIs embedded into current applications (photo slide shows for Eog; music library browsing for Rhythmbox; login user browser for GDM; and these are just the first items that come to mind). In the mobile environment arena, Clutter is meant to be used as a cornerstone – along with GLib, GStreamer and the rest of the GNOME mobile stack – for developing a new kind of UI, where the desktop guidelines and style don’t apply.
Failsafe
About JSON-GLib: things have gone quiet on that front, but lately I’ve resumed working on it ((In a couple of separate branches, for the time being, but when those are ready, they will be merged back into master and will be released as 0.6.0)).
I decided to try the new GLib test framework that has landed in the 2.15 cycle; GLib and GTK+ are both already using it, and now a branch of JSON-GLib is GTest-powered. Setting it up is not hard – but it requires some changes in the build environment. The API is quite straightforward — just call:
g_test_init (&argc, &argv, NULL);
inside your main, then add the test functions with:
g_test_add_func ("/test-section/foo", test_function_foo); g_test_add_func ("/test-section/bar", test_function_bar);
and finally run the test using:
return g_test_run ();
which will return the exit code used by the gtester
program to determined whether the successfully test passed or not.
The test suite is built along with your library or application, but run only with make check
and make distcheck
. There’s also an automatic report generator which will dump an XML file with the results, which you can then parse to create HTML pages or other forms of report. The rest of the work is putting a set of pre-cooked declarations for the Makefile templates into the root of your project; including it in every Makefile.am file; create some tests
directories; and dump there the test units. I bet that Anjuta or other IDEs with autotools support can be tweaked to do this stuff for you.
JSON-GLib is now using GTest to test the data types API (for the time being, Array and part of the Node) and the Parser behaviour; nothing very complicated, at first, but it’s good to have it all automated and a simple make
away. Adding new test cases to exercise the whole API will be the priority in the next weeks.
The Laws Have Changed
This week I got an invite for trying out Github beta. Github is a nice service providing some space and tools to set up git repositories for open source projects.
Obviously, setting up HTTP (dumb) read-only git repos is doable on any box connected to the intertron by merely copying the repository; the nice bits of working with git, though, like pushing branches and tags, or fast cloning through the git: protocol are somewhat harder to set up, so anything that relieves you from actually doing this kind of work should always be welcome.
Github not only provides you with that: it also gives you an incredibly nice web interface; a wiki; the ability to easily track other projects through RSS feeds; the ability to easily set up a “fork” of another repository, thus easing the pain of setting up personal development repositories for contributors.
I decided to try Github by moving there JSON-GLib‘s development git repository, plus some branches and the release tags. The operation took me approximately ten minutes, including the account creation, and it was all very easy and very well explained.
At the moment, Github is in beta ((If anyone is interested to try it, I have two invites an invite left to give out invites are now all gone)) and there are lots of projects starting out; if anything happens, cloning out with full repository history is also a nice feature of git, so I guess that side is covered as well. Bugs and feature requests are now handled using wiki pages, so if I’d have to make a request to the guys at Logical Awesome then it would be: dudes, move to a serious bug tracking system – wikis don’t scale for that (believe me: been there, done that).
All in all, it’s a great service – the way SourceForge should have been, if technology allowed it at the time and if they didn’t choose to reimplement the damned BTS and mailing list archives with something that can only be described as “made of fail”; and if they plan to make me pay a reasonable fee, it’s fine for me: Github’s UI alone is worth it.
Travelling Band/Back
finally, back at home after FOSDEM 2008. the last leg of the trip back from Bruxelles has been exceptionally longer because the London Metropolitan Network on weekends is, apparently, made of fail.
the Clutter talk on saturday went, in my opinion, quite well; lots of people listened to my ramblings and watched my simple slide show. about the talk: it was my first with a slightly modified Lessig method approach and I have to say that it’s been a very satisfactory experience – nonetheless because it removes the need to put slides online, which I never end up doing anyway ((I’ve got a git repository with the small application I wrote to give the talk with, so if you want it you can always ask me for the URL to clone)).
Travelling Band
Meet the Farce
Helm, set a course… for love
a GNOME cruise? I already have the theme song…
GNOME-Love Boat, love exciting and new, Come aboard, we're expecting you. The GNOME-Love Boat soon will be making another release, The GNOME-Love Boat promises something for everyone. Set a course for adventure, Your box's on a new romance. And GNOME-Love Won't hurt anymore, It's an open source, On a userfriendly shore. it's GNOME-Love Welcome aboard it's GNOME-love
Enterlude
I’ve just sent this to the Clutter mailing list, but I guess that more exposure is fine
as some of you might already know, we have started working on a reference “toolkit” based on Clutter called Tidy.
Tidy is a simple library containing some useful actors and interfaces which can be used by applications developers; it aims to be simple and yet provide some high-level classes that Clutter won’t provide.
it is by no mean complete, or aiming to replace other toolkits; you can think of it as a reference implementation for a toolkit based on Clutter.
Tidy works as a standalone toolkit, but it can also be used as a copy-and-paste repository, like libegg for the gtk+ stack; because of this, it doesn’t provide any kind of API or ABI guarantee, and it probably won’t be released in form of tarballs. it can be seen as a constant work in progress.
right now, Tidy is composed of these classes:
- TidyActor – a base actor class, implementing stylable actors, with padding and alignment
- TidyButton – a simple button class
- TidyFrame – a container capable of aligning its only child
- TidyListView – a list view using
ClutterModel
to introspect its structure and contents- TidyCellRenderer – base cell renderer class
- TidyCellRendererDefault – default cell renderer
- TidyListColumn – base column class
- TidyListColumnDefault – default column
- TidyTextureFrame – a texture that efficiently clones a background image so that it can stretch the entire size allocation
- TidyProxyTexture – a texture class that efficiently caches the source file
- TidyTextureCache – a cache for textures loaded from on-disk data
- TidyTextureReflection – an actor using GL to compute a reflection of the parent texture (imported from the toys)
- TidyStylable – base interface for stylable objects
- TidyStyle – storage class for a style
- TidyScrollable – base interface for scrollable actors
- TidyAdjustment – object for clamping a value between two boundaries (with quantum increments support)
- TidyScrollBar – scroll bar actor controlling an adjustment
- TidyViewport – scrollable viewport controlled by a pair of adjustments
Update@2008-02-07T10:01Z: after this announcement, Chris added two new actors:
- TidyScrollView – a viewport with scoll bars
- TidyFingerScroll – a viewport with kinetic scrolling
Plus a lot of bug fixes.
there are examples for basically every class and functionality under the tests/ directory.
since everybody want screencasts these days:
this is still in the prototyping stage; meaning: if it breaks (and it will break) you get to keep both the pieces. also, there are rough edges and missing functionality. we’ll keep working on it and adding new classes between now and Clutter 0.6 (and after), and also use Tidy as a testing ground for Clutter functionality and staging ground for actors/data structures/interfaces.
you can check out Tidy from SVN using:
svn co http://svn.o-hand.com/repos/tidy/trunk tidy
or browse the repository from your web browser via:
http://svn.o-hand.com/repos/tidy/trunk/ (raw) http://svn.o-hand.com/view/tidy/trunk/ (viewcvs)
in other, Clutter-related news:
- Iain has been working on a Clutter and WebKit-based browser actor; you’ll find a very cool screencast of it on Iain’s blog.
- In Clutter trunk we landed initial support for FBOs and we’re fixing bugs/updating bindings/updating documentation toward the 0.6.0 release.
- It’s a bit old, but I’ve been updating the Vala bindings for Clutter and Clutter-GTK, so you can now use all the bling with Vala; you’ll need Vala trunk, but it’s worth it.
Paint the Silence/2
Continuing the ongoing saga…
Using the --silence
hackery from Jacob Berkman I found a way to finally STFU at least libtool. In your configure.ac
add:
changequote(,)dnl LIBTOOL="\\$(QUIET_LT)${LIBTOOL}" changequote([,])dnl
Add a Makefile.decls
file to the root of your project, containing:
QUIET_LT = @echo ' ' LIBTOOL $@;
And include it in every Makefile.am
:
include $(top_srcdir)/Makefile.decls
This will silence all libtool invocations; you can make this all conditional, obviously: just sorround the QUIET_*
declarations with if VARIABLE...endif
and define VARIABLE
using AM_CONDITIONAL
in your configure template.
Now, I’ll just have to find a way to make gcc shut up ((no, you cannot redefine CC
, as it will be invoked by libtool as well)), and so the saga will end with a third chapter.