On Mon, 18 Oct 2010, Lukasz Sokol wrote:

On 18/10/2010 12:22, Michael Schnell wrote:
 On 10/18/2010 09:57 AM, Michael Van Canneyt wrote:

How else can you do this ? Each widget system uses it's own mechanisms, the LCL 
must somehow unify this, and they did. To remain delphi compatible, they based 
the 'public interface' on the Windows mechanism.
"Windows" is the only OS that provides an Event "Message" queue to the running 
applications (in fact Windows even does provide it to any thread, while Delphi and Lazarus only provide means 
to use it in the Main Thread). With all other "Widget Types" (that allow for Event Driven 
programming) the Event queue is done in pascal code in the LCL (or MSE library). All these Widget Types are 
binding to a GUI Tool set that uses call backs to fire the GUI events. Theses GUI events need to be scheduled 
together with Timers and thread based events, so an Event Queue is implemented in Pascal code.

A decently versatile central Event Queue implementation (best: in the RTL) 
would be usable for all Widget Types. With Windows it needs to be checked if 
this leads to a performance degradation (using user space code instead of doing 
some additional system calls might in fact even improve the performance, but 
with all other Widget types the resulting code flow should be quite similar and 
thus performance should stay the same.


How about a DBUS compatible way (if no DBUS there, have a native surrogate, but 
if there is DBUS, use it)?

Would it not work ?

D-BUS does not provide an event loop, but it must be integrated with
existing event loops. It also requires linking to libdbus, introducing again
a dependency on some external tool.

Michael.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to