Do it with style!

Integration is the new “innovation”. This integration can happen at different levels. Usually people think of integrated APIs and library-frameworks. That kind of integration is what makes a platform feel elegant and sophisticated in the eyes of a software-engineer working on such a platform. An end-user will never ever get in touch with this sort of integration. He or she obtains their impression of a system via the visual integration or the interaction of different programs forming a solid entity.

Gosh, what am I just pulling out of my a** there… sorry :)

Actually I want to pick up where I left here and much earlier during the unprepared session at FOSSCamp. For some things I’m implementing (e.g. a face-browser for gdm), I need to be able to truely mix gtk+-widgets and OpenGL in a seamless way. To this day neither pigment nor clutter provide the kind of integration I want. The approach I’m using takes gtk+-widget-trees (placed inside a GtkEventBox) loaded from glade-files, redirects them to offscreen-rendering, generates GL-textures using GLX_EXT_texture_from_pixmap and finally animates them to my hearts content in GL.

Those who want to play around with this, will find the sourcecode in a day or two on launchpad. I’ll post the links to the bzr-repos here on my blog once they are ready.

What works…

  • respects themeing
  • respects widget-resizing
  • any widget or widget-tree can be animated in this way
  • works with stock gtk+ shipping with major distributions (e.g. Ubuntu 7.10)
  • works under metacity and compiz

Remaining issues…

  • input redirection at the toolkit-level
  • update-lag after theme-change
  • integration inside gtk+ itself, instead of application-level code
  • or adding this to clutter/pigment

The obligatory screencast…


(click to play back, ogg/theora, ~6.4 MBytes)

(click to play back, ogg/theora, ~23.3 MBytes)

Elsewhere - in Italy to be more precise - Andrea Cimitan, the author of the murrine gtk+-theme engine, has been busy too. Asking me some questions once in a while, our recent chats lead to something very slick. He went wild with the upcoming murrine-0.60. See for yourself…


P.S.: My gtk+-widgets on OpenGL also work with that new murrine theme… just in case you might have wondered :)

14 Responses to “Do it with style!”

  1. matt Says:

    Hot! Really hot!

  2. dlai Says:

    Amazing!

  3. Lucas Rocha Says:

    The question is: how much coding effort do you need to develop those examples? If we want to have something like this in the platform level (GTK+ level), it needs to have a relatively simple API, otherwise developers won’t feel confortable to use it. Also, there are lots of cool things such as animations and transitions that could be implicitly implemented in the toolkit themeing level.

  4. Radek Doulik Says:

    Cool demo! Looking forward to see it in gdm.

    What do you use to capture the screencast video?

  5. Jon Cooper Says:

    We have libsexy, now we need libmacslowisagod …. maybe even make it part of the platform! :)

    Also, Murrine is looking AWESOME. So much cool stuff, and not even a platform "bump" to 4.0 in sight ;)

  6. ll Says:

    That second demo was hot! The murrine theme screens too.

  7. mike Says:

    The only thing I can say: You really know what you’re doing!

    Creating such wonderful things on your own really gives you my complete respect.

  8. rcaree Says:

    Congratulaitons !!!!!!!!! Great Job !!!! Thanks !!!

  9. Henrique Says:

    Wow. Looks like a lot of fun MacSlow! ;)

    I hope this can make its way upstream, surely a lot of apps can do nice new tricks with this. Any idea how those widgets can behave when compositing is not available (like a "go in legacy" mode)?

  10. MacSlow Says:

    @ Lucas: Well the examples are about 2000 lines of code. Of those 2000 lines 1100 are GL-code, which is boiler-plate to get the usual things going. I could strip it down further… certainly. The gtk+-related code is just a few lines. I think getting this into gtk+ and create a patch for upstream would be a very nice thing indeed!

    @ Radek: I use a combination of xvidcap 1.1.6, ImageMagick (convert) and gstreamer (gst-launch-0.10).

    @ Jon: Pah, who cares for version-numbers :)

    @ mike: Wow… what can I say.

    @ rcaree: Hehe, you’re welcome!

    @ Henrique: For the approach I use, one does not need a composited desktop. Put differently, compiz does not need to be running. Only a working GLX_EXT_texture_from_pixmap implementation in your graphics-driver is needed.

  11. gord allott Says:

    I am all for modernisation of gui toolkits, but i have to ask, what about the lowley people who don\’t have graphics card acceleration? i would be concerned about coding anything like this if it did not have an implicit fallback mode for people who don\’t have the requirements, such as no animation but same functionality.

  12. elvyse Says:

    Jet Set Radio Future for the win! :)

  13. Tanja Short Says:

    Great art. Can’t wait to see it in stable condition to use on my box.
    This kind of software will surely change how humans and computers interact.

  14. reaping one Says:

    hi, first of all I’d like to say awesome work there, I’m currently writing a media center for linux using pygtk and glade and have been thinking of implementing an opengl renderer to use transitions for those who have hardware acceleration, and have been looking at using clutter to do this, but when I saw this demo i thought this would be perfect and would save me so much time as i can use my existing glade interface and push widgets offscreen, and all the widgets i want to use transitions on are in eventboxes anyway. So i guess the biggest question is have you releases the sources for this yet? and if so I saw that you were going to do it through launchpad, I have never used that before and was wondering how i access your project?

    many thanks for any advice, and keep up the awesome work you are a legend

Leave a Reply