Re: Help CPU usage at 8.9% ?
- From: Paul Barton-Davis <pbd Op Net>
- To: Rasoul Hajikhani <rhajikhani exchange office etoys com>
- Cc: gtk-list gnome org
- Subject: Re: Help CPU usage at 8.9% ?
- Date: Thu, 16 Nov 2000 15:53:33 -0500
>how is it done, one gtk_timeout_add() for all _TWTY of them? Sorry man but
>I am new to the whole concept of gtk...
>-r
----------------------------------------------------------------------
gint
update_level_holds (void *arg)
{
GList *list = (GList *) arg;
GtkWidget *levelhold;
gint n;
gfloat value;
for (; list; list = g_list_next (list)) {
levelhold = (GtkWidget *) list->data;
... get relevant value for meter ...
gtk_level_hold_set (levelhold, value);
}
return TRUE;
}
Then, somewhere, do this:
GList *level_hold_list = 0;
... construct level holds, add them to the list ...
gtk_timeout_add (100, update_level_holds, level_hold_list);
----------------------------------------------------------------------
Clear ? This code is not tested, I'm just passing on the rough idea.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]