Re: How to setup a timer in gtk
- From: Jorge Navalon <jorge navalon gmail com>
- To: ying lcs <yinglcs gmail com>
- Cc: gtk-list gnome org
- Subject: Re: How to setup a timer in gtk
- Date: Wed, 12 Dec 2007 18:17:31 +0100
El mié, 12-12-2007 a las 11:04 -0600, ying lcs escribió:
> Hi,
Hi,
>
> Can you please tell me how can I setup a timer in gtk application?
>
> It has a 'g_timeout_add()' function, but it 'Sets a function to be
> called at regular intervals, with the default priority,
> G_PRIORITY_DEFAULT.'
>
> But all I want is it call my function to be called only once when the
> timer expires.
> How can I do that?
According to the documentation: 'The function is called repeatedly until
it returns FALSE, at which point the timeout is automatically destroyed
and the function will not be called again. The first call to the
function will be at the end of the first interval.'
So you should simply return FALSE in your function.
>
> Thank you.
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]