In article <[EMAIL PROTECTED]>, Oguz Akyuz <[EMAIL PROTECTED]> wrote:
> Hi, > > I know that to keep ui responsive (or update itself) we can use Fl::check() > in intensive computation loops. However, when such loops are not written by > ourselves, for instance when using an external libraries, it is not possible > to insert this statement into the loop body. > > In my case I'm doing image loading/saving operations using external libraries > and I would like to keep the ui responsive while the image is being loaded or > saved. How can I ensure a responsive behavior in such a case? In such conditions you can use threading - provided that the library is thread safe, that is. See the "threads" demo in the test directory. In your case, you can basically spawn a new thread to perform the operation. At the end of the thread, notify FLTK using Fl::awake() and continue. Read the threading introduction in the documentation. There are some "gothas". _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

