[lazarus] Multiplataform
Sebastian Günther
sguenther at gmx.de
Tue Jun 29 03:45:55 EDT 1999
Nicolas Aragon wrote:
> Using this approach, and KCL people seems to go this way, it's
> possible to write both trees independently.
no, it uses a different approach: at the moment KCL is a single big unit
(only the signal/slot stuff is separated, as this isn't platform
dependent). Its interface and implementation parts are a bunch of
include files.
e.g. kcl_gtk/kcl.pp looks about the following:
unit kcl;
interface
<some GTK specfic declarations>
{$INCLUDE kcl_h.inc}
implementation
{$INCLUDE kcl_impl.inc} // platform-independent method
implementations
{$INCLUDE gapp.inc}
{$INCLUDE gdrawing.inc}
{$INCLUDE gform.inc}
...
end.
kcl_h.inc basically does the following stuff:
{$INCLUDE hkeys.inc}
{$INCLUDE hdrawing.inc}
{$INCLUDE hguibase.inc}
...
So all implementations share the same interface part; the only thing you
have to do is to define some target-dependend types at the beginning of
the interface part. For example, a TWidget has a member called 'Handle'.
Under GTK, this is defined as a PGtkWidget, unter Win32 it is a HWindow,
and so on.
> I must disagree a bit: I've been waiting a long time for "procedure of
> object" bugs to be solved.
you're not alone...
- Sebastian
More information about the Lazarus
mailing list