Awt implementation in libgcj?
Anthony Green
green@cygnus.com
Mon Dec 13 18:52:00 GMT 1999
Rolf wrote:
> 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/ >.
This looks really cool. I tried building it with a recent gcj/libgcj.
There are some issues in your code, and some in libgcj...
In PackedColorModel.java...
public PackedColorModel(ColorSpace cspace, int pixelBits,
int[] colorMaskArray, int alphaMask,
boolean isAlphaPremultiplied,
int transparency,
int transferType) {
super(pixelBits, initMasks(colorMaskArray, alphaMask), cspace,
(alphaMask != 0), isAlphaPremultiplied, transparency,
transferType);
The call to initMasks is really a reference to `this', which can't
appear before the call to the super constructor. Older versions of
gcj didn't catch this - but current ones do (as does SUn's javac).
natWindow.cc includes two files that we don't currently install:
config.h and jvm.h. They don't appear to be required by natWindow.cc
(at least, with a recent libgcj), so you should probably remove them.
The linker is complaining that _Jv_Throw doesn't exist. I tried this
on a platform that uses sjlj exceptions. cni.h says:
#ifdef SJLJ_EXCEPTIONS
#define _Jv_Throw _Jv_Sjlj_Throw
#endif
SJLJ_EXCEPTIONS is defined in config.h, which we don't install or
include in this file. What should we do about this - Tom? Andrew?
AG
--
Anthony Green Cygnus Solutions
Sunnyvale, California
More information about the Java
mailing list