Re: How do other non GUI stuff during gtk_main? (Parallel process?...)



From: Chris Seberino <seberino spawar navy mil>
>
> gtk_main makes program wait for GTK+ "events".
>
> What if I want to have a math program
> also running **at the same time**??? I want
> this math program to keep streaming
> numbers that cause pictures to change on GUI.
>
> Likewise, I want events to affect behavior
> of math program.
>
> How can I have GUI and math program interact???
>
> Notice that math program runs constantly so
> it is not an "event" that comes and goes.

Usually, different processes communicate by pipes.
Just take the file descriptor for your pipe, wrap it
in a GIOChannel (see the glib API), and put a watch
on that channel with g_io_add_watch().

Ron Steinke



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