Re: Timer gives up
- From: Owen Taylor <owt1 cornell edu>
- To: "gtk-list redhat com" <gtk-list redhat com>
- Subject: Re: Timer gives up
- Date: 23 Feb 1998 17:26:39 -0500
Stephen Birch <sbirch@ironmountainsystems.com> writes:
> I'm not sure if I have misunderstood the purpose of the timer, but it
> doesn't seem to keep calling my callback function. Oddly, if I put a
> print statement inside the callback it seems to repeat just fine.
>
> Is there some fundamental item I have missed?
Yes. ;-)
gint gtk_timeout_add (guint32 interval,
GtkFunction function,
gpointer data);
typedef gint (*GtkFunction) (gpointer data);
^^^^
If your function returns true, then the timer will be reinstalled.
If it returns false, it will only run once. If it returns 'void',
then you may get strange results ... as you've noticed.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]