Thread overview
More D gui experiments
Sep 19, 2003
Mike Wynn
swig
Sep 19, 2003
Walter
Sep 20, 2003
Mike Wynn
Sep 24, 2003
Walter
September 19, 2003
I've started porting the X11 headers to D
http://www.geocities.com/one_mad_alien/dxwin.html
currently only X11/X.h and X11/Xlib.h have been ported
(most macros missing) but enough to create a window an get events.


September 19, 2003
"Mike Wynn" <mike@l8night.co.uk> wrote in message news:bkdtps$209o$1@digitaldaemon.com...
> I've started porting the X11 headers to D
> http://www.geocities.com/one_mad_alien/dxwin.html
> currently only X11/X.h and X11/Xlib.h have been ported
> (most macros missing) but enough to create a window an get events.

You're doing some great work. Can I suggest instead looking at swig (www.swig.org) which is essentially a C++ compiler that will read C++ source and generate wrappers for it for other languages? It needs a personality module for D, at which point the nirvana of being able to import C++ libraries into D will become easy.


September 20, 2003
Walter wrote:
> "Mike Wynn" <mike@l8night.co.uk> wrote in message
> news:bkdtps$209o$1@digitaldaemon.com...
> 
>>I've started porting the X11 headers to D
>>http://www.geocities.com/one_mad_alien/dxwin.html
>>currently only X11/X.h and X11/Xlib.h have been ported
>>(most macros missing) but enough to create a window an get events.
> 
> 
> You're doing some great work. Can I suggest instead looking at swig
> (www.swig.org) which is essentially a C++ compiler that will read C++ source
> and generate wrappers for it for other languages? It needs a personality
> module for D, at which point the nirvana of being able to import C++
> libraries into D will become easy.
> 
> 

I agree, someone writing a Swig D module is the best approach
my simple experiments with (what I called demios) proved to me that a real C/C++ parser/compiler(semantic at least) was required not the simple regex's I was trying for any non trival headers.

that said, I've not realy got the time/inclination to wade through the Swig doc's to workout how to get it to do what is required, and I'm sure there are those reading this that have better c++ skill than I, and/or more interested in Swig.

I'm more interested in abusing the D compiler for my own sadistic pleasure!

and by the time someone else has got Swig working with D, I should have at least the basics of a D win32/X Gui (modification of my dfc classes)
that can then benifit from the better grade of ported header, and be a test that the Swig method generates correct import modules.

September 24, 2003
"Mike Wynn" <mike@l8night.co.uk> wrote in message news:bki5ht$2arh$1@digitaldaemon.com...
> I agree, someone writing a Swig D module is the best approach
> my simple experiments with (what I called demios) proved to me that a
> real C/C++ parser/compiler(semantic at least) was required not the
> simple regex's I was trying for any non trival headers.
>
> that said, I've not realy got the time/inclination to wade through the Swig doc's to workout how to get it to do what is required, and I'm sure there are those reading this that have better c++ skill than I, and/or more interested in Swig.
>
> I'm more interested in abusing the D compiler for my own sadistic
pleasure!
>
> and by the time someone else has got Swig working with D, I should have at least the basics of a D win32/X Gui (modification of my dfc classes) that can then benifit from the better grade of ported header, and be a test that the Swig method generates correct import modules.

If you're familiar with perl, there is a perlscript that comes with wxwindows for C# that seems to handle the usual cases.