[fpc-devel] procedure ... message(); in Linux

Marc Weustink marc.weustink at cuperus.nl
Thu Feb 18 17:12:16 CET 2010


Michael Schnell wrote:
> On 02/18/2010 02:48 PM, Sergei Gorelkin wrote:If this is possible with
> FPC/Linux, I
>>> should make sure that it's still possible with the NoGUIApplication
>>> package.
>>>
>> Windows has a built-in transport for the messages, Linux doesn't. Of
>> course there
>> are libraries providing similar or even better functionality, but you
>> end up depending
>> on particular library.
>
> I do know this. This is why I need to port Martin's NoGUIApplication,
> which has an internal message queue, to Lazarus,
>
> I suppose with Linux, FPC (or Lazarus ? ) uses X11 as a message queue
> provider.

Nope. On non windows widgetrsets, lazarus implements its own 
messagequeue which is handled in application.Idle.
On some widgetsets (iirc Carbon and QT) this messagequeue is mixed with 
the messagequeue if that widgetset.


> But I was not yet able to find out how to post a message into
> the X11 queue (with a thread or another application) and capture this
> message by an FPC "procedure ... message" construct. (with FPC/Lazarus
> on Windows this does work fine using Windows messages)

AFAIK, X11 has no messagequeue but is based on callbacks.

> If it does work with Linux/X1, I need to think how to make it work with
> NoGUIApplication, as well. If it does not work in Linux, anyway, I don't
> think I'll bother.


Marc



More information about the fpc-devel mailing list