Version 26 (modified by Martin Kolman, 13 years ago) (diff)


Python-Clutter development notes

ModRana? will in the future use Clutter as an alternative to the current non-accelerated GTK GUI. Unfortunately, the documentation to the Python bindings for Clutter is in a sad state. This page serves as a compilation of various Clutter & Python related development notes, with the hope to piece together some sort of documentation for the most needed elements :)

NOTE: all of this information concerns Python bindings for Clutter 1.0

Gathered resources

documentation from various sources

official incomplete documentation, taken from Debian PyClutter package: for the package.

official documentation improved by Paolo Marti, from his GitHub page:

PyClutter tutorial, also by Paolo Marti:

complete examples for the above mentioned tutorial:

a short PyClutter tutorial by TuxRadar:

a small PyClutter recipe:


actors not getting motion notify events

Call set_reactive(True) on the actor and it will start receiving motion notify events. Clutter does this probably as an optimization, eq. it has to handle the motion notify event only for actors that request it.

compiling more recent clutter version

Raw notes

# compile dependencies

export PATH=/opt/bin:$PATH
export LD_LIBRARY_PATH=/opt/lib:/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib
export PKG_CONFIG_PATH=/opt/lib/pkgconfig/

./configure --enable-gtk-doc --enable-docs=yes --enable-introspection=yes

checking for XEXT extension... configure: error: Not found ????

# libffi4-dev:
  CCLD   g-ir-compiler
../girepository/.libs/ undefined reference to `ffi_prep_closure_loc'
../girepository/.libs/ undefined reference to `ffi_closure_free'
../girepository/.libs/ undefined reference to `ffi_closure_alloc'
collect2: ld returned 1 exit status
make[2]: *** [g-ir-compiler] Error 1

# libffi-dev:
  CC     libgirepository_1_0_la-gdump.lo
  CC     libgirepository_1_0_la-gfield.lo
In file included from gfield.c:4:
girffi.h:24:17: error: ffi.h: No such file or directory
In file included from gfield.c:4:
girffi.h:29: error: expected ')' before '*' token
girffi.h:37: error: expected specifier-qualifier-list before 'ffi_cif'
girffi.h:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
girffi.h:52: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
girffi.h:57: error: expected declaration specifiers or '...' before 'ffi_closure'
make[2]: *** [libgirepository_1_0_la-gfield.lo] Error 1

available methods

summary of available methods