On Wed, Apr 24, 2013 at 01:03:38PM +0200, Michael Van Canneyt wrote: > > Of course it can. > > You make the task far too complex. Start by NOT looking at the LCL code. > > You need simply to start with > > TCustomEventLoopApplication = Class(TCustomApplication) > // Whatever > end; > > Which abstracts the event loop. > > Then you implement a > > TConsoleEventLoopApplication = class(TCustomEventLoopApplication) > // Whatever > end; > > which implements the event loop for console apps using whatever mechanism you > see fit. > You could e.g. make use of libevent which provides a ready-to-go event loop. > > This will demonstrate that your concept works. > > After that, the remaining task is to make sure that TApplication from the > LCL can be built on top of TCustomEventLoopApplication. I'm sure this will > not take too long. > > All this is perfectly doable for 1 person.
The base win32 pattern can be seen in (the old) ICS v5 (overbyte.be), unit conio. IIRC it uses (under Delphi) forms.allocatehwnd which is annoying since it is a non visual component in a visual unit. It did contain some primitives for D1 though, which I used in the FPC port. -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
