[Glade-users] stopping an iteration when i button is released.



Hi everybody, i have a small problem this time, but i cant figure out
what to do. I use liglade2 and Glade3. 

I want this after button is pressed: 1. first i want some code to be
executed, 2. then i want to periodically increment a value x untill the
button is released 3. and after that i would like to execute some other
code. 
I guess only the iteration part is the problem. For this i thought about
an iteration with a usleep(T) to make it being incremted every T and to
make it stop when a boolean which checks if the button is clicked (or
actually in my case: pressed) returns FALSE. But i couldnt find a
boolean for this. I did found something about
gtk_get_current_event_state () and gtk_get_current_event() though i
didnt get them to work (maybe i just do not understand them well)... So
does anybody know how to keep an iteration going untill a button is
released?

Thanks a lot in advance,

Koen

P.s. i prefer to not use pressed combined with released because that
doesn't work well with my GUI update code ( while (gtk_events_pending
()) g_main_context_iteration (NULL,FALSE); ). So i prefer to only use
the pressed signal.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]