comp.lang.ada
 help / color / mirror / Atom feed
* windows bindings
@ 2001-10-11 22:27 chris.danx
  2001-10-11 23:04 ` David Botton
  0 siblings, 1 reply; 8+ messages in thread
From: chris.danx @ 2001-10-11 22:27 UTC (permalink / raw)


Hi,

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.

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'.
The second is using OpenGL with GWindows (which admittedly I haven't looked
at) 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?).

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?

Chris






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: windows bindings
  2001-10-11 22:27 windows bindings chris.danx
@ 2001-10-11 23:04 ` David Botton
  2001-10-12 11:51   ` chris.danx
  0 siblings, 1 reply; 8+ messages in thread
From: David Botton @ 2001-10-11 23:04 UTC (permalink / raw)
  To: comp.lang.ada


----- 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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: windows bindings
  2001-10-11 23:04 ` David Botton
@ 2001-10-12 11:51   ` chris.danx
  2001-10-12 14:24     ` David Botton
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: chris.danx @ 2001-10-12 11:51 UTC (permalink / raw)




> > 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?

The same license as X is distributed with, on sourceforge they call it the
mit license.  http://www.opensource.org/licenses/mit-license.html


> GWindows comes under the GMGPL not sure why this
> creates a problem regardless of lic.

I've asked here before but not got any reply (lost in the 'is Ada dying'
thread? <rh>) on the issue of what this license allows and how it affects
tools written with tools that use it, hence my confusion as to
compatibility.  I believe the X (MIT or OpenGroup) license is compatible
with the GPL but I wasn't sure how compatible it is with the GMGPL.  Has
anyone wrote a simplified (i.e. not in legal jargon) summary of the GMGPL
license that describes what it allows like the ppl have tried to do with the
GPL?

> Any changes to GWindows would of course
> come under that lic., but code with'ing GWindows should not be 'infected'.

Brill.


> > 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.

That's great.


> 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 ;-)

Normally I'd feel the same.

The goal for the future is to have a degree of compiler independance, but
that looks a longway off at present. i.e. I'll worry about that later (there
are likely going to be a few C developers on the C implementation, but I'm
the sole Ada developer, which is very worrying all things considered), and
if need be port Gwindows to ObjectAda if it's still going strong.


Thanks,
Chris






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: windows bindings
  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:22     ` tmoran
  2 siblings, 1 reply; 8+ messages in thread
From: David Botton @ 2001-10-12 14:24 UTC (permalink / raw)
  To: comp.lang.ada

> Has
> anyone wrote a simplified (i.e. not in legal jargon) summary of the GMGPL
> license that describes what it allows like the ppl have tried to do with
the
> GPL?

The GMGPL is GPL plus the following (taken from the GWindows headers):

-- As a special exception,  if other files  instantiate  generics from
this --
-- unit, or you link  this unit with other files  to produce an
executable, --
-- this  unit  does not  by itself cause  the resulting  executable  to
 be --
-- covered  by the  GNU  General  Public  License.  This exception does
not --
-- however invalidate  any other reasons why  the executable file  might
be --
-- covered by the  GNU Public
         --


I do have a question about this, perhaps Robert Dewar and others with more
experience can answer this question:

If some one was to extend through OO an Ada tagged type would this new type
and associated code be infected with the GMGPL?

Practical example:

In GWindows you have handlers that can be used to set events, but it is also
possible to use OO to override various events and respond to them. Would
that mean that my Whatchamakalit Order Entry forum must now be released
under GMGPL since it uses OO to handle events from say
GWindows.Windows.Window_Type

At what point is something an extension to GWindows or an entity on to its
own, becomes very blurred here...

David Botton





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: windows bindings
  2001-10-12 11:51   ` chris.danx
  2001-10-12 14:24     ` David Botton
@ 2001-10-12 16:56     ` Ted Dennison
  2001-10-12 18:35       ` chris.danx
  2001-10-12 18:22     ` tmoran
  2 siblings, 1 reply; 8+ messages in thread
From: Ted Dennison @ 2001-10-12 16:56 UTC (permalink / raw)


In article <POAx7.2002$oE5.292470@news2-win.server.ntlworld.com>, chris.danx
says...
>> What is the MIT Lic?
>
>The same license as X is distributed with, on sourceforge they call it the
>mit license.  http://www.opensource.org/licenses/mit-license.html

Supposedly (I haven't checked myself lately) X11 has some extra text at the
bottom forbidding use of the author's name in advertising. This variant the FSF
preferes to call the "Expat license" for some reason. Supposedly it is
GPL-compatable, but that doesn't mean an "Expat" user would consider the GPL
"Expat-compatable". :-)

>compatibility.  I believe the X (MIT or OpenGroup) license is compatible
>with the GPL but I wasn't sure how compatible it is with the GMGPL.  Has

The GMGPL is just the GPL with some extra text preventing the "viral" spread of
the GPL under certian circumstances. If the GPL is compatable, the GMGPL should
be as well.

>anyone wrote a simplified (i.e. not in legal jargon) summary of the GMGPL
>license that describes what it allows like the ppl have tried to do with the
>GPL?

Sure. I can do it in two sentences. Its the GPL, plus:

As a special exception,  if other files  instantiate  generics from this
unit, or you link this unit with other files to produce an executable,
this unit does not by itself cause the resulting executable to be
covered by the GNU General Public License.  This exception does not
however invalidate any other reasons why the executable file might be
covered by the GNU Public License.

That *is* the GMGPL. :-)


---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html

No trees were killed in the sending of this message. 
However a large number of electrons were terribly inconvenienced.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: windows bindings
  2001-10-12 14:24     ` David Botton
@ 2001-10-12 17:05       ` Ted Dennison
  0 siblings, 0 replies; 8+ messages in thread
From: Ted Dennison @ 2001-10-12 17:05 UTC (permalink / raw)


In article <mailman.1002896718.11068.comp.lang.ada@ada.eu.org>, David Botton
says...
>Practical example:
>
>In GWindows you have handlers that can be used to set events, but it is also
>possible to use OO to override various events and respond to them. Would
>that mean that my Whatchamakalit Order Entry forum must now be released
>under GMGPL since it uses OO to handle events from say
>GWindows.Windows.Window_Type
>
>At what point is something an extension to GWindows or an entity on to its
>own, becomes very blurred here...

It doesn't seem that blurred to me. If you put your "extension" in one of your
own packages, then it is in a separate program unit from the GMGPL'ed sources.
There's no actual sources from the GMGPL'ed unit in your program unit (package),
so the only real copyright issue with the use of the program unit that is under
the GMGPL is that you are linking against it. The GMGPL clearly says that
linking cannot by itself force you to use the GPL, so you are free.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html

No trees were killed in the sending of this message. 
However a large number of electrons were terribly inconvenienced.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: windows bindings
  2001-10-12 11:51   ` chris.danx
  2001-10-12 14:24     ` David Botton
  2001-10-12 16:56     ` Ted Dennison
@ 2001-10-12 18:22     ` tmoran
  2 siblings, 0 replies; 8+ messages in thread
From: tmoran @ 2001-10-12 18:22 UTC (permalink / raw)


>The goal for the future is to have a degree of compiler independance, but
>that looks a longway off at present. i.e. I'll worry about that later (there
  CLAW is an existence proof of a compiler independent Windows binding.
(Though there is a special version for Gnat 3.13, it's just to get
around a, presumably temporary, bug introduced in Gnat 3.13)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: windows bindings
  2001-10-12 16:56     ` Ted Dennison
@ 2001-10-12 18:35       ` chris.danx
  0 siblings, 0 replies; 8+ messages in thread
From: chris.danx @ 2001-10-12 18:35 UTC (permalink / raw)



> >compatibility.  I believe the X (MIT or OpenGroup) license is compatible
> >with the GPL but I wasn't sure how compatible it is with the GMGPL.  Has
>
> The GMGPL is just the GPL with some extra text preventing the "viral"
spread of
> the GPL under certian circumstances. If the GPL is compatable, the GMGPL
should
> be as well.

Ok.

> >anyone wrote a simplified (i.e. not in legal jargon) summary of the GMGPL
> >license that describes what it allows like the ppl have tried to do with
the
> >GPL?

> Sure. I can do it in two sentences. Its the GPL, plus:
>
> As a special exception,  if other files  instantiate  generics from this
> unit, or you link this unit with other files to produce an executable,
> this unit does not by itself cause the resulting executable to be
> covered by the GNU General Public License.  This exception does not
> however invalidate any other reasons why the executable file might be
> covered by the GNU Public License.
>
> That *is* the GMGPL. :-)

Seen it millions of times before just didn't realise this was what ppl here
meant by the GMGPL.






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-10-12 18:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-11 22:27 windows bindings chris.danx
2001-10-11 23:04 ` David Botton
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

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