Re: [LAD] pyqt vs wxpython for audio apps?

From: Pedro Lopez-Cabanillas <pedro.lopez.cabanillas@email-addr-hidden>
Date: Mon Sep 07 2009 - 20:35:34 EEST

On Sunday, September 6, 2009, Iain Duncan wrote:
> How do you communicate to the gui loop when it should update
> itself based on audio activity?

The GUI loop reads events from some event queue, and distpatches these events
to the graphic widgets. A strategy very easy to implement is to create and
insert new events into the event queue (without waiting to be consumed), so
they would be processed asynchronously using the proper GUI context. How
exactly to do this depends on the GUI system. Some examples:

In MS Windows, PostMessage() puts an event into the event loop
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

For Qt applications, the equivalence is QCoreApplication::postEvent()
http://doc.trolltech.com/4.5/qcoreapplication.html#postEvent

There are similar functions in Mac OSX. See NSApplication::postEvent(). Maybe
somebody can explain an equivalence for glib/gtk+, if there is one?

Regards,
Pedro
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Tue Sep 8 00:15:01 2009

This archive was generated by hypermail 2.1.8 : Tue Sep 08 2009 - 00:15:02 EEST