Rob Shortt wrote:
> Duncan Webb wrote:
>> I wonder if it is possible to incorporate the pygame event loop into
>> notifier or may be another way to get mouse events.
> 
> Sure, here's an example:
> 
>     def step_event(self):
>         for e in pygame.event.get():
>             if e.type is QUIT:
>                 sys.exit(0)
>             if e.type is KEYDOWN:
>                 if e.key == K_ESCAPE or e.key == K_q:
>                     sys.exit(0)
>                 elif e.key == K_f:
>                     pygame.display.toggle_fullscreen()
> 
>             self._screen.gui.event(e)
>         return True
> 
> 
>     kaa.notifier.Timer(self.step_event).start(1.0/10)
> 
> 
> This empties the pygme event queue 10 times per second, which seems to
> be enough for me.  For Freevo, inside that for loop you could access
> some dict / mapping to translate specific pygame events to Freevo events
> and fire them off.
> 
> I hope that helps.  It just so happens that I've been writing some
> kaa+pygame code.

Sorry that it has taken me ages to get round to this, Xmas was a bit
busy with not doing Freevo things.

The first question is where does this code belong, in the rc module?

Duncan



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to