WRT creating bindings for self-made actors, that is relatively straightforward. I have done similar things for the OCAML bindings I'm building.

Basically, you need to follow the recipe for creating a new Gobject- based actor class as discussed in the Clutter documentation. Even better, you can copy some of the stuff implemented for the coglbox examples which used a private data structure in the object (you will need something like this).

In the private data structure, you will need to keep references to all of the python closures/lambdas (whatever you call them:). In the "foo_actor_init", you can pass in all of the python closures or Py_NULL or whatever for methods you don't want to implement.

Then you write C functions that correspond to all of the routines that you might want to override. The C function will simply check the private structure to see if, for example the "pick" function has a python closure, and then invoke it with the appropriate arguments.

I hope this helps. I can send you an incomplete example if it helps, but it will be for OCAML, so may not be that illuminating.

WRT threads and cairo, I think you should be pretty safe as long as you implement it properly. I mean, you really just need to make sure that your thread is operating on its own Cairo context, maybe just to a backing pixmap. The you can blit this in using a Cairo.paint or other mechanism.

- Reid
--
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to