> I don't see the problem. You are passing a pointer to the info
> structure and of course you can change it's contents later and the
> timer_func will get the current value when it accesses info->timer_id.
> Apart from that, I don't think you need the timer_id since you can
> remove the timeout
Hi,
"David J. Singer" <[EMAIL PROTECTED]> writes:
> Thanks to Pauk for the pointers on how to make my autorepeat
> code a bit more elegant, but having looked at the suggestions
> I'm a bit puzzled...
>
> info->value++;
> info->count = 0;
> info->state = 0;
> info->timer_id = gtk
Thanks to Pauk for the pointers on how to make my autorepeat
code a bit more elegant, but having looked at the suggestions
I'm a bit puzzled...
info->value++;
info->count = 0;
info->state = 0;
info->timer_id = gtk_timeout_add(REPEAT_STAGE0_DELAY,
>Perhaps someone with a bit more experience of this sort of thing could point
>out a neat way to avoid all the globals here, so this code could be reused
>in a more generic way...
>
>Perosnally, I *like* globals... :-)
you are right about needing a bit more experience :)
>guint32 timer_id = 0
particularly in
light of the fact that someone asked a similar question straight after me.
The auto-repeat starts after the button is held for 500ms, then goes through
two levels of speedup if the button is still pressed.
Perhaps someone with a bit more experience of this sort of thing could point
>
>Hi
>
>Can anyone give me some pointers on implementing a form of auto-repeat...?
>I've looked through the FAQ and the Tutorial, but it's only mentioned as a
>"things to add later" when talking about designing custom widgets...
>
>I don't want
Hi
Can anyone give me some pointers on implementing a form of auto-repeat...?
I've looked through the FAQ and the Tutorial, but it's only mentioned as a
"things to add later" when talking about designing custom widgets...
I don't want to add repeat to buttons or