Re: Question: Making a Gtk+ application interacts with octave



amartinez atc ugr es wrote:
OK. This is the question:
octave is an interpreter, I have written a little application to show an
image. But a want to keep the window alive when my function gtk_imshow
is finished.

        I'd like to work in this way with Octave, for example:

        gtk_imshow (x, r,c);
        pause
        gtk_imshow (x.*2, r,c);
        pause
        gtk_imshow (a_beautiful_filter(x), r,c);

(Want this code working allways with the same Gtk+ window...)

Why would you need threads ?

I assume your syntax would look something like this:
===================================================
GtkWindow *window;

window = create_window(); // Creates a GtkWindow with a child
                          // GtkDrawingArea (or whatever you're using)

/* ... */

gtk_imshow (window, x, r,c);
/* pause */
gtk_imshow (window, x.*2, r,c);
/* pause */
gtk_imshow (window, a_beautiful_filter(x), r,c);
===================================================

The only tricky part is to know when is the appropriate time
to create & destroy your window.

Cheers,
                              -Tristan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]