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

Re: bypassing gtk_main



On 28 Aug, Dennis Nikitenko wrote:
> Greetings,
> 
> Me and my partner have been using GTK+ to develop a small library for
> graph plotting. We need to create a window, plot data and then to be able
> to update the screen, sending it new data to plot. To do that we need to
> access the plotting functions after the window has been created and
> displayed. However, once the window is created and the first batch of
> data is sent to it, we need to enter the GTK event listening loop
> gtk_main() in order to display it on the screen. After that we cannot
> access any GTK function untill gtk_main returns, but by then the window is
> destroyed. We've been trying to find a way around this, but we
> unsuccessful. Can anyone think of any way to bypass this problem?

Why don't you use a time-out or idle function (time-out would be
better, I think). Use gtk_timeout_add to install a timeout.
The timeout is run periodically and then can read data, and update the
display.

Roland
-- 
Roland Smith                      "I haven't lost my mind,
r s m i t h @ x s 4 a l l . n l    I know exactly where I left it."
http://www.xs4all.nl/~rsmith/



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