On 11/25/2011 09:45 AM, Felipe Monteiro de Carvalho wrote:
X11 does not send direct events. Direct events are sent by Cocoa and also by Android. I don't know if you can stick non-X11 events into that queue, but this hability by itself is not what defines something as a queue or not.
The question is what is meant by "send" here. AFAIK, (other than Windows that does a "Messages" mechanism) here, we have callbacks. And Callbacks result from the main thread of the application calling a function. (i.e. the LCL main thread calls it's own subroutine via this mechanism). OTOH, the external Widget Set only "runs" while being in this call and thus the main thread needs to do it "not-busy" waiting within such a call to the Widget set, to have same be responsive to the user. Thus the LCL-code of the mainthread is stalled while the WidgetSet function (including the Callback) is working. So the results that the LCL code produces withing the callback needs to be asynchronously transferred back to be handled (later) in a user-code event handler and thus need to be re-transferred to be handled withing the main execution loop (that calls the user code events). This is why an (additional) event queue fed by (results of) GUI events is necessary.
-Michael -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
