In my application, I am implementing status indication (displaying either 'red' 
or 'green' ) by using Gdkpixmap to assign an image to 'red' or 'green' pixel 
array. i display or hide the image by calling gtk_widget_show (..) or 
gtk_widget_hide(..) .
The structure of my application is as follows:
 int main()
{
1.  Assign Pixmaps


--- On Tue, 3/10/09, Jim George <jimgeo...@gmail.com> wrote:

From: Jim George <jimgeo...@gmail.com>
Subject: Re: Continuous variable updation in a text box
To: aj...@knac.com
Cc: gtk-app-devel-list@gnome.org
Date: Tuesday, March 10, 2009, 8:19 PM

It wouldn't matter too much, since most screens would only have a refresh
rate of 60-120 Hz, which is also much higher than what most people can even see.

I've handled such cases by using g_idle_add when I get an update of the
variable's status, and have the idle function update the text box. I
preserve the event source ID for the next call, and check if that source is
still available. If so, I remove the event using g_source_remove and add a new
idle event. This way, the most recent update is shown on screen the next time my
program goes idle. The idle function then marks the source as free, by setting
it to zero.

-Jim

Ardhan Madras wrote:
> So you will need call textbox insertion (update) 1000 times per second or
the textbox get updated every 1ms, my question is: Can you see it changes
correctly with given cycle?
> 
> --- adeelmali...@yahoo.com wrote:
> 
> From: Adeel Malik <adeelmali...@yahoo.com>
> To: > Subject: Continuous variable updation in a text box
> Date: Tue, 10 Mar 2009 02:48:15 -0700 (PDT)
> 
> I intend to monitor the variable's value (acquired via data
acquisition hardware) at a rate of around 1,000 times per second.
> I haven't used textboxes before in GTK+. Could anyone suggest how to
update the value of a variable in a textbox etc., at this rate.
>  Thanks,
> Adeel
> 
> 
>       _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> 
> 
> 
> 
> _____________________________________________________________
> Listen to KNAC, Hit the Home page and Tune In Live! --->
http://www.knac.com
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



      
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to