There is TCustomApplication in fcl/inc/custapp. The Lazarus TApplication 
descends
from it. All you need to do is create a descendent of TCustomApplication which
can implement all the messaging you wish for...
I took a look at TCustomApplication. Same does not provide anything that is related to scheduling (e.g.: ProcessMessages), but everything else that TApplication has. Supposedly the scheduling stuff is added by Lazarus.

So the way to go is
(1a) do the scheduling stuff based on messages in it's own object.
(1b) do TApplication as a descendant of TCustomApplication and have it use the scheduling object.
(1c) do TTimer in a way that it sends messages to the main thread.
(1d )do TThread.Synchronize in a way that it sends messages to the main thread.

and later
(2a) do TSchedThread as a descendant of TThread in a way that it uses the scheduling object. (it will have things like TSchedThread.Run and TSchedThread.ProcessMessages). (2b) do TTimer in a way that when used with TSchedThread it sends it's messages to the appropriate thread


-Michael
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to