The Cross Plattform DWT
John Reimer
terminal.node at gmail.com
Sun Jan 20 14:00:32 PST 2008
Bill Baxter wrote:
>>
>> Yes, the win port has just started; I have not yet committed any ported
>> source... No they don't share much source code (other than perhaps a few
>> highlevel sections).
> The implementation of widgets on linux uses
>> gtk+/cairo, while the implementation on win32 graphics/system calls.
>> It's
>> quite a bit of work. It would be a mess to integrate both projects into
>> one (using version statements).
>
> Ok. Well I was just thinking of wxWidgets, which has subdirectories for
> platform-specific stuff, and other subdirectories for the common stuff.
> There's a fair amount of common stuff there. I would expect SWT/DWT
> to not differ too terribly much from wx in the ratio. So, anyway, just
> surprising to me to see the different ports going to entirely different
> repositories. But if it works for you then, great.
>
> --bb
SWT actually tries to separate platform specific stuff into internal/gtk or
internal/win32. But then it creates a class OS, which all widgets use to
access system specific calls.
yes, a few directories do contain files that are common across platforms:
events, layout, part of accessibility, a tiny portion of internal, and
maybe some of graphics). Otherwise... everything else is very system
specific implementation (see widgets modules).
I know some projects organize into platform directories for internal things
(eg harmonia), and I agree that it's a good idea, but I still think that
this would be difficult to do given the already established organization of
swt. You would litterly have to pull it apart and restructure it.
GtkD has little trouble doing one source base for both linux and win32
because it uses common gtk+ calls on both platforms. It doesn't even have
to separate win32 and linux specific calls in different directories. This,
perhaps would be a possibility for DWT also if it had a common linux and
win32 gtk+ port.
Anyway, thanks for the suggestion. If you have a look at DWT and think
there's a workable solution for integrating the two, please feel free to
propose a solution... But /IF/ we ever get several other OS ports done, the
suggestion would have to be practical enough for multiple platforms.
One other reason we didn't put the ports together was that we wanted to keep
the size of the hg (mercurial) repositories down so that people didn't have
to download volumes of unrelated platform code.
-JJR
More information about the Digitalmars-d-announce
mailing list