This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Awt implementation in libgcj?
On Fri, Dec 10, 1999 at 08:32:40AM -0800, Tom Tromey wrote:
> >>>>> "Eric" == Eric Cayeux <ericc@online.no> writes:
>
> Eric> Some time ago, there was a discussion thread about how to
> Eric> implement Awt in libgcj. Can anyone tell me if this work has
> Eric> started and if it has started when will the first version will
> Eric> come out?
>
> As far as I'm aware nobody is working on this.
I've done some experimentations with gcj and the X Windowing System
just for fun. The code I have does not implement the AWT, but it does have
some CNI based wrappers for Xlib structures. I've made the code available
at <URL:http://www.ii.uib.no/~rolfwr/jcnix/>. Warning: This is not a
properly maintained project. I've been extremely busy lately and have not
had the chance to develop the code further. I've made the code available
rather than simply letting the code gather dust on my local hard drive, in
case someone out there wants to tinker with it.
(just don't expect too much)
-------- from the README:
This started out as some simple experimentation with the CNI interface
of gcj and Xlib. After a while, development veered into reimplementing
significant chunks of the Java 1.2 API.
This code is still in its infancy stage. With time, I'd like the code
to evolve into something useful.
I tend to ramble on in the comments of the source code, and generally
treat the source code as my personal playground. Sorry about
that. Things will be cleaned up when things calm down.
I didn't have any strong opinions concerning licensing, so I just
released it under LGPL. Licensing conditions for future releases
is open to discussion. Basically, I want the code to be as useful for
the general community as possible. I usually don't copy the license
boilerplate to every source file, mainly because I find it both a
hassle and redundant.
The current state of the code is a true mess. Programming started with
simple classes for common Xlib abstractions. After the time the code
actually started showing windows, the coding has continued in all
directions. First creating XImage objects, then renderers for
converting 24 bit RGB images to any XImages with any True color
packing. Image support has been hacked a bit. Only the true color
visual is useful at the moment. To speed up this conversion some
native C++ code was created, including a nifty way of specifying
arbitrary conversion functions using templates. These templates
actually generates some decent code.
Then I realized that some of the rendering infrastructure had much in
common with some of the Java 2D classes. So the development shifted to
creating clean room implementations of the interesting Java 2D
classes, while continuing the work on rendering, now based on the Java
2D classes.
Concerning package names no.rwr... There does not exist a rwr.no
domain. It is totally fictional. I didn't have any suitable
package/domain name to place the files under, and I didn't want
piggyback on someone elses package hierarchy without getting explicit
permission to do so.
The classes within existing packages such as java.awt... are either
meant as minimal stub classes to get things running, or classes that
will evolve into full cleanroom implementations of the original Sun
classes. It is not my intention to subvert any APIs within these
packages. I may not like parts of the Sun APIs, but I want keep all
the non-standard code outside of the standard packages.
Most of the clean room implementation has been done while only
referring to the HTML API documenation from the Sun website. This
documentation was often open to interpretation. In such cases I've
simply made guesses. Very little time has been spent verifying that my
implementations act similarly to the Sun classes. Actually, very
little time has been spent verifying that the implementations works
reasonable at all. This will improve in the future.
This release definitively follows the "release early" motto.
I hope that someone finds this code, if not useful, at least
interesting.
Compiling:
Currently you need to edit the Makefile to point to the right location
of the libgcj files.
Simply typing "make" should compile both of the main test programs
(Viewer and TestWindow).
However, keep in mind that this code has not been properly tested, and you
should expect that a certain amount of tinkering is needed to make it run.
--------
--
Rolf W. Rasmussen
Smith's Law: "Any sufficiently optimistic statement is
indistinguishable from sarcasm." -- Eric Smith