Re: Widget updates
- From: Victor <drzoidberg wanadoo es>
- To: chico santanna uol com br
- Cc: Gtk app devel <gtk-app-devel-list gnome org>
- Subject: Re: Widget updates
- Date: 25 Jul 2002 19:15:12 +0200
Hi!
I think you should use timeouts better than sleeps in your code, because timers doesn't load the CPU. See gtk_timeout_add and gtk_timeout_remove (in gtk+-1.2) in the GTK reference manual.
For example, if you want to update something every second, you should do something like this
void function (gpointer data)
{
update (data);
}
guint timer;
timer = gtk_timeout_add (1000 /* time in miliseconds */, function, data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]