Re: Events




On Jan 10, 2005, at 12:55 PM, ADIS - C.P.D. wrote:

Gtk2->main_iteration while (Gtk2->events_pending) process all events pending.

Is there a way to process only all events for a specific widget?

Short answer: Not really.

Medium answer that is actually a question: What are you trying to do?

Long answer:
Events pile up in an event queue, and it's quite that -- first in, first out. In standard usage, the only way to get to the third event in the queue is the handle the two that precede it. So far as i know, there is no way to peek at anything other than the top of the queue.

Now, if you desperately need to rig up something that could conceivably handle all the events for this one widget before any others, i'd first ask "why? what are you trying to do?" (because i can't make up anything for myself), and then answer with something cryptic like "you'd have filter and dispatch events yourself by overriding the event handler, which runs the risk of breaking your entire app or at the very least slowing it down."

More info, please.

--
"Ears! They help us -- Ears! They help us hear th-- Ea--E--E--E--Ears!"
  -- A Sesame Street singing toy, with Yvonne gleefully pressing
    the button over and over and over and over and...




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