Tag Archives: gtk

An introduction to pyclutter (part two)

This tuto­r­ial is out­dated: it refers to ver­sion 0.4 of clut­ter that now is VERY old.

Last time we learned how to have our first stage drawn, so now it’s time to begin to insert some­thing into that stage.

Let do a sum­mary of what we are going to do in this “lesson”:

  • change the stage’s color
  • add a rectangle to the stage
  • add another rectangle to the stage

Read more »

An introduction to pyclutter (part one)

This tuto­r­ial is out­dated: it refers to ver­sion 0.4 of clut­ter that now is VERY old.

This tuto­r­ial is the first of a series that will try to learn to you how to use clut­ter with the help of python, or better: a tuto­r­ial about pyclutter.

But before to begin, it’s better to give an overview on what clut­ter is. Citing the clutter’s homepage:

Clut­ter is an open source soft­ware library for cre­at­ing fast, visu­ally rich and ani­mated graph­i­cal user inter­faces. Clut­ter uses OpenGL (and option­ally OpenGL ES) for ren­der­ing but with an API which hides the under­ly­ing GL com­plex­ity from the devel­oper. The Clut­ter API is intended to be easy to use, effi­cient and flex­i­ble.

That said, while clut­ter is the main library (writ­ten in C), there are bind­ings to other lan­guages like perl, vala, ruby, C# and python. The python bind­ing is com­monly named pyclutter.

The require­ments needed to better follow the tuto­r­ial are:

  • a good python knowledge (of course); if you don’t know it, you can always learn it by following the excellent dive into python
  • some basic knowledge of how the GTK environment works; although it isn’t really needed since we won’t use GTK functions, it is very useful since, under a certain point of view, clutter inherits many things from GTK
  • clutter 0.4.2 or newer

Read more »