Re: Creating widgets with auto-repeat

2002-02-10 Thread David J. Singer
> 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

Re: Creating widgets with auto-repeat

2002-02-09 Thread Sven Neumann
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

Re: Creating widgets with auto-repeat

2002-02-09 Thread David J. Singer
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,

Re: Creating widgets with auto-repeat

2002-02-07 Thread Paul Davis
>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

Creating widgets with auto-repeat

2002-02-07 Thread David J. Singer
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

Re: auto repeat

2002-02-05 Thread Paul Davis
> >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

auto repeat

2002-02-05 Thread David J. Singer
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