[lazarus] Update

Curtis White osiriz at teleport.com
Wed Oct 27 00:36:14 EDT 1999



On 26-Oct-99 Marc Weustink wrote:
> 
> Now the question how to implement. I think thewre are a few options:
> 1)
> Don't support direct API calls. Use their class counterparts. IE, dont use
> ExtTextOut(Canvas.Handle, ...) but use Canvas.ExtTextOut(...). This bereaks
> a lot of compatibility.
> 
> 2)
> Use a platform dependent windows.pp like the classes unit. However there
> aleady exists a rtl windows.pp (and linux.pp)
> 
> 3)
> Since linux.pp and windows.pp are rtl files, create ONE LCLwindows.pp. This
> file contains (win)API related implementations for every platform (if it is
> possible) or just a call to its InterfaceObject(since it's global)
> counterpart (all platform specific stuff in one place). Like
> LCLwindows.ExtTextOut calls InterfaceObject.ExtTextOut.
> 
> Question is, what way to go. I think I prefer last one. It's only adding a
> reference to LCLwindows if needed. Any thoughts ?
> 

I agree with you. I like the last option. But the problem we will need to
overcome is the compatibility with Delphi. Almost every Delphi unit in
existance contains:

uses Windows ...

So all of those would need to be changed depending on which environment you are
compiling in. If compiling in Windows, then everything is fine. But then the
code will need to be changed to compile in Linux. Also, when compiling in
Windows, how would we handle functions that are the same in both LCLwindows and
Windows?


Curtis






More information about the Lazarus mailing list