AWT update: what is in, what isn't

Peter C. Mehlitz peter at
Thu Sep 3 11:50:09 PDT 1998

You may have noticed some AWT updates. Here is a brief description of the major
changes (besides a number of patches which were sent to the mailing list):

1) PNG support - even with full alpha channel! (i.e. not just
transparent/solid - hello, Gimp). You need the libpng for that (I think it
also is on This comes just with one restriction, and I
really would appreciate if some PNG guru could help out there: interlaced PNGs.
Due to the design of libpng, these beasts currently require a whole image
buffer before they can be transfrmed into a native image (not just a single
scanline buffer). Unfortunately, images are interlaced when they are big (that
makes it even worse). Could somebody look for expanding these Adam7 interlced
images with less buffer space? The relevant file is imgpng.c

2) GIF support. If you have libgif of libungif on your machine, the system will
use them - but be aware of the legal hazzles (thanks to Unisys). The only
restriction is that URL loaded GIFs have to be stored temporarily on disk
(maybe there somedays will be a patched libungif).

3) Mouse handling and popups. So far, everything between a mouse press and a
mouse release was routed to the same window (some Java-internal grabbing). This
corresponds well with standard X behavior (where X autmatically does this with
respect to toplevel windows if you start to drag). But unfortunately, it
doesn't map well to all potential popup usages. Until now, we triggered popups
automatically on a clicked event, and operated them by mouse moves, mouse
click. Now, you have to care for launching the popups by yourself
(isPopupTrigger() returns true for mouse press). They work in both drag and
move mode (with submenues automatically opened/closed in drag mode).

4) Dummy peers. A number of apps (or libs like swing) used getPeer() to
determine (a) if a component has passed its addNotify(), and (b) if it is a
lightweight. We therefore added dummy LightWeight/WindowPeers to allow this.
But other than "getPeer() != null" and "peer instanceof LightweightPeer" you
cannot make use of this.

I haven't yet fixed/implemented the missing color modes (DirectColor and
StaticGray), it's next on my list.

I also haven't decided upon the Frame size (see my prev. message) - still
waiting for some feedback

-- Peter

More information about the kaffe mailing list