www.digitalmars.com         C & C++   DMDScript  

D - More D gui experiments

reply Mike Wynn <mike l8night.co.uk> writes:
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.
Sep 18 2003
parent reply "Walter" <walter digitalmars.com> writes:
"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.
Sep 19 2003
parent reply Mike Wynn <mike l8night.co.uk> writes:
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.
Sep 20 2003
parent "Walter" <walter digitalmars.com> writes:
"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
Sep 24 2003