comp.lang.ada
 help / color / mirror / Atom feed
From: "David Botton" <David@Botton.com>
To: <comp.lang.ada@ada.eu.org>
Subject: Re: windows bindings
Date: Thu, 11 Oct 2001 19:04:38 -0400
Date: 2001-10-11T19:04:38-04:00	[thread overview]
Message-ID: <mailman.1002841518.25069.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: S0px7.9097$i14.966042@news2-win.server.ntlworld.com


----- Original Message -----
From: "chris.danx" <chris.danx@ntlworld.com>


> Are there any open source bindings to the Windows API?  The bindings that
> come with GNAT are out because of the terms underwhich they are
distributed.

Since the Microsoft SDK is available for free the lic. on the Windows API is
not an issue. Once you get the C version from Microsoft you have the needed
lic.

> Gwindows looks like a good candidate, however there are some issues that
> come to mind.
>
> The first is license compatibility, the project will use the 'MIT
License'.

What is the MIT Lic? GWindows comes under the GMGPL not sure why this
creates a problem regardless of lic. Any changes to GWindows would of course
come under that lic., but code with'ing GWindows should not be 'infected'.


> The second is using OpenGL with GWindows (which admittedly I haven't
looked
> at)

No biggy. GWindows gives you direct access to the Windows Handles, etc. so
hooking in to any of the available OpenGL bindings should be a non issue.

 >and the third is it's relationship to GNAT.  Since it's a prototype the
> third issue can be forgotten about (out of curiosity, how much work would
be
> needed to get Gwindows to work with another Windows compiler say
> ObjectAda?).

In some early tests, I have succesfully compiled and used much of GWindows
under ObjectAda with minimal change, less the ActiveX and Database parts as
they require GNATCOM. It is ceratinly not a huge job to do the port. The
biggest problem is the lack of some GNAT specific extensions like
'Unrestricted_Access which is used in many of the examples and tutorials.

Even though my main focus is on promoting Ada, I certainly am a believer in
the GPL (where it doesn't conflict with the main focus :-). Writing "free"
software certainly seems more natural on a "free" compiler ;-)

> If it is not possible to use gwindows is there an alternative, doubly free
> (open source and no pennies) binding?  If not how much work would be
> involved in creating a binding (probably a thin one)?  Can it be done
> automatically?

You can generate a partial binding from WinTLB (originaly designed for
importing Windows APIs in to VB) using GNATCOM, but with GWindows around and
the simple techniques I use in binding to Windows (as seen in the bodies of
GWindows code), you are better off just using bindings for cutting and
pasting when absolutely needed.

David Botton





  reply	other threads:[~2001-10-11 23:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-11 22:27 windows bindings chris.danx
2001-10-11 23:04 ` David Botton [this message]
2001-10-12 11:51   ` chris.danx
2001-10-12 14:24     ` David Botton
2001-10-12 17:05       ` Ted Dennison
2001-10-12 16:56     ` Ted Dennison
2001-10-12 18:35       ` chris.danx
2001-10-12 18:22     ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox