Hi!

I'm making a program that has only a widget that's a GtkDrawingArea.
In that widget I draw my own objects.

Well, I want it to be refreshed as fast to produce some smooth efect
in the objects that are moving inside.

For drawing the objects inside i've put a expose callback function.
And, until yesterday, I was using a timeout callback to queue a draw
event. Timeout set to 30 ms.
It was very cpu consuming.

So I changed it, to queue draw events on a idle callback, if an update
flag is set, and I set that flag from a timeout callback. Why?
Because the idle loop was executed too many times, so I have this
restricted to a timeout..

Well, at this point, the problem is that it keeps using too much cpu! :-)
so, i don't know what should I do.

I've seen that there are some gtk's idle_add_priority function, but
I don't have that one in python-gtk2 2.0.0-1, debian's module.

And also I'm not sure if using that is the right way to do the things.
Maybe this question is more gtk-related than pygtk. 

Well, anyway, I think that with idle&timeout implementation that
I did, the cpu wasting I have is constant when I draw more objects
on the DrawableArea..

Well, that's all, thanks in advance!
alejandro
-- 
+ There is no dark side of the moon really. Matter of fact it's all dark.



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to