You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mark Hindess <ma...@googlemail.com> on 2006/06/18 20:04:12 UTC

awt and swing integration issues

The outstanding change mentioned in the previous note is an integration
of the java code into new modules:

  accessibility
  misc
  swing

and replacement the existing awt stubs.

I've only moved java code.  The native code is still built
using the original contributed ant files and even then only if
"-Dwith.awt.swing=true" is set on the ant command line.

I don't intend to integrate the native code right away.  My reasoning
is:

a) It will break everyone build unless they have all the dependencies
(libjpeg, libpng, and liblcms) in the right place.  I want to give
people time to discuss how to handle this.  On linux, these packages
are very common so we really should use the installed dynamic libraries
if possible.  Using liblcms and libjpeg should be easy since they both
use "pkg-config" (as in "pkg-config --cflags lcms" and "pkg-config
--libs lcms") if their development packages are installed.  We'll need
collect details of the required packages for different distributions.
Debian packages are liblcms1-dev, libjpeg-dev (virtual package) and
libpng12-dev.  Anyone fill in the gaps for other distributions?

Not sure what to do on windows. libjpeg and libpng seem to be available
in the MinGW Package repository at:

  http://mingwrep.sourceforge.net/

Anyone tried using these to meet the requirements on Windows?


b) Oliver is about to split the natives and I want to do these natives
the new way.  (So I'll let him do a couple of modules for me to copy!
;-)


c) I'm also wondering about the motivation for using C++ when I can't
see any pressing reason to require this.


Regards,
 Mark.



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: awt and swing integration issues

Posted by Alexey Petrenko <al...@gmail.com>.
2006/6/18, Mark Hindess <ma...@googlemail.com>:
> a) It will break everyone build unless they have all the dependencies
> (libjpeg, libpng, and liblcms) in the right place.  I want to give
> people time to discuss how to handle this.  On linux, these packages
> are very common so we really should use the installed dynamic libraries
> if possible.  Using liblcms and libjpeg should be easy since they both
> use "pkg-config" (as in "pkg-config --cflags lcms" and "pkg-config
> --libs lcms") if their development packages are installed.  We'll need
> collect details of the required packages for different distributions.
> Debian packages are liblcms1-dev, libjpeg-dev (virtual package) and
> libpng12-dev.  Anyone fill in the gaps for other distributions?
>
> Not sure what to do on windows. libjpeg and libpng seem to be available
> in the MinGW Package repository at:
>
>  http://mingwrep.sourceforge.net/
>
> Anyone tried using these to meet the requirements on Windows?
I've compared libraries available through MinGW with AWT requirements...
The only library which meets the requirements is libjpeg.
libpng is too old.
lcms is not available.

So we should try to find another place to get the libraries or... add
this libraries to MinGW :)

SY, Alexey
-- 
Alexey A. Petrenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: awt and swing integration issues

Posted by Gregory Shimansky <gs...@gmail.com>.
On Sunday 18 June 2006 22:04 Mark Hindess wrote:
> if possible.  Using liblcms and libjpeg should be easy since they both
> use "pkg-config" (as in "pkg-config --cflags lcms" and "pkg-config
> --libs lcms") if their development packages are installed.  We'll need
> collect details of the required packages for different distributions.
> Debian packages are liblcms1-dev, libjpeg-dev (virtual package) and
> libpng12-dev.  Anyone fill in the gaps for other distributions?

It looks to be different in different distributions. In gentoo lcms and libpng 
have pkg-config files while libjpeg doesn't.

-- 
Gregory Shimansky, Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: awt and swing integration issues

Posted by Alexey Petrenko <al...@gmail.com>.
2006/6/20, Tim Ellison <t....@gmail.com>:
> Alexey Petrenko wrote:
> > 2006/6/18, Mark Hindess <ma...@googlemail.com>:
> >>
> >> On 18 June 2006 at 22:16, "Alexey Petrenko"
> >> <al...@gmail.com> wrote:
> >> > 2006/6/18, Mark Hindess <ma...@googlemail.com>:
> >> > > c) I'm also wondering about the motivation for using C++ when I can't
> >> > > see any pressing reason to require this.
> >> > You mean that most of the native code is C++ but not C?
> >>
> >> Yes.  It seems to be a mixture of C and C++ and although I only looked
> >> at a couple of files I didn't see anything that really needed C++
> >> features.
> >>
> >> For portability I'd stick to C if C++ isn't really required.
> > But C++ gives at least 2 benefits for developer:
> > 1. Strict type checking
> > 2. It is allow to write env->FindClass("java/lang/Object") instead of
> > (*env)->FindClass(env, "java/lang/Object") :)
> >
> > Windows version also uses GDI+ which is class library.
> >
> > So I vote for C++...
>
> I remember this discussion ;-)
>
> I don't object to using C++ syntax, but let's try to avoid the use of
> STL and other minefields that vary across implementation/platforms.
No objection on this :)

SY, Alexey

-- 
Alexey A. Petrenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: awt and swing integration issues

Posted by Tim Ellison <t....@gmail.com>.
Alexey Petrenko wrote:
> 2006/6/18, Mark Hindess <ma...@googlemail.com>:
>>
>> On 18 June 2006 at 22:16, "Alexey Petrenko"
>> <al...@gmail.com> wrote:
>> > 2006/6/18, Mark Hindess <ma...@googlemail.com>:
>> > > c) I'm also wondering about the motivation for using C++ when I can't
>> > > see any pressing reason to require this.
>> > You mean that most of the native code is C++ but not C?
>>
>> Yes.  It seems to be a mixture of C and C++ and although I only looked
>> at a couple of files I didn't see anything that really needed C++
>> features.
>>
>> For portability I'd stick to C if C++ isn't really required.
> But C++ gives at least 2 benefits for developer:
> 1. Strict type checking
> 2. It is allow to write env->FindClass("java/lang/Object") instead of
> (*env)->FindClass(env, "java/lang/Object") :)
> 
> Windows version also uses GDI+ which is class library.
> 
> So I vote for C++...

I remember this discussion ;-)

I don't object to using C++ syntax, but let's try to avoid the use of
STL and other minefields that vary across implementation/platforms.

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: awt and swing integration issues

Posted by Geir Magnusson Jr <ge...@pobox.com>.
My USD0.02...

1) If I were to write a GUI toolkit, I can't imagine why I wouldn't use
C++ given relationships like "DialogBox is a Window"

2) Isn't it a reasonably safe bet that any platform that has a GUI is
'advanced' enough to have a reasonable C++ compiler for it?

I understand the need to stick to the simplicity of C, but I'm not
surprised w/ the C++

Mark, are you suggesting we convert it back to C?

geir

Alexey Petrenko wrote:
> 2006/6/18, Mark Hindess <ma...@googlemail.com>:
>>
>> On 18 June 2006 at 22:16, "Alexey Petrenko"
>> <al...@gmail.com> wrote:
>> > 2006/6/18, Mark Hindess <ma...@googlemail.com>:
>> > > c) I'm also wondering about the motivation for using C++ when I can't
>> > > see any pressing reason to require this.
>> > You mean that most of the native code is C++ but not C?
>>
>> Yes.  It seems to be a mixture of C and C++ and although I only looked
>> at a couple of files I didn't see anything that really needed C++
>> features.
>>
>> For portability I'd stick to C if C++ isn't really required.
> But C++ gives at least 2 benefits for developer:
> 1. Strict type checking
> 2. It is allow to write env->FindClass("java/lang/Object") instead of
> (*env)->FindClass(env, "java/lang/Object") :)
> 
> Windows version also uses GDI+ which is class library.
> 
> So I vote for C++...

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: awt and swing integration issues

Posted by Alexey Petrenko <al...@gmail.com>.
2006/6/18, Mark Hindess <ma...@googlemail.com>:
>
> On 18 June 2006 at 22:16, "Alexey Petrenko" <al...@gmail.com> wrote:
> > 2006/6/18, Mark Hindess <ma...@googlemail.com>:
> > > c) I'm also wondering about the motivation for using C++ when I can't
> > > see any pressing reason to require this.
> > You mean that most of the native code is C++ but not C?
>
> Yes.  It seems to be a mixture of C and C++ and although I only looked
> at a couple of files I didn't see anything that really needed C++
> features.
>
> For portability I'd stick to C if C++ isn't really required.
But C++ gives at least 2 benefits for developer:
1. Strict type checking
2. It is allow to write env->FindClass("java/lang/Object") instead of
(*env)->FindClass(env, "java/lang/Object") :)

Windows version also uses GDI+ which is class library.

So I vote for C++...
-- 
Alexey A. Petrenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: awt and swing integration issues

Posted by Alexey Petrenko <al...@gmail.com>.
2006/6/18, Mark Hindess <ma...@googlemail.com>:
> c) I'm also wondering about the motivation for using C++ when I can't
> see any pressing reason to require this.
You mean that most of the native code is C++ but not C?

-- 
Alexey A. Petrenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org