This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Awt implementation in libgcj?



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]