Ernst Lippe <[EMAIL PROTECTED]> writes:

> As promised here is my API proposal for a plug-in preview widget. 
> You can find it at http://refocus.sourceforge.net/preview.

In the section "Design" in "Calling the render function" you state:

 A somewhat smarter version of this preview used a different
 approach. The rendering function had to call back to the GTK main
 loop, so it could process new events.

I wouldn't call this a smart version since this is something that you
better not try to implement. Why do you want to drive the GTK+ main
loop yourself? This only leads to really complicated behaviour (as you
seem to have experienced yourself). The easiest approach to this
problem seems to be to split the rendering function into small
chunks. Instead of calling some function that processes events, the
render function returns after computing a small tile of the preview
image. The standard GTK+ main loop takes back control, user events are
processed and if it ever becomes idle again, the list of invalid tiles
is examined and the render function is called with the next area to
update. Did you consider this approach?

Salut, Sven
Gimp-developer mailing list

Reply via email to