RE: AWT Comments

Date view Thread view Subject view Author view

From: Parmelan, Edouard (EP510777@exchange.FRANCE.NCR.com)
Date: Thu Jan 07 1999 - 08:40:06 EST


Godmar, Peter,

> Nevertheless, I think XTC is a really cool thing.
I think so but we only need a little part or XTC,
the X Protocol. Unfortunary, it's not extractable
from XTC, we have to rewrite/remove some features.

> ad (2): External libs (I assume you mean libpng, libjpeg, libgif, etc.)
do
> not depend on X, or do they? In fact, the way it's now is probably wrong;
> these should go in libraries/awt/png, libraries/awt/jpeg,
libraries/awt/gif.
>
> So, using XTC or the like would still allow these performance-critical
> routine to be native. Nobody would want to implement image scaling in
> jitted Java (also it may be possible using gcj, but why reinvent the
wheel).
> In fact, factoring out the X dependent parts will allow for easier ports
> to Win32, etc. and might even simplify the custom edition.

imggif.c, imgjpeg.c and imgpng.c use only XImage api of Xlib.

For the X Protocol point of view, XImage is simply the data
send by PutImage and received by GetImage.

An XImage is a local (client side) datas.

There is no function in Xlib that manage a whole scanline of an
XImage, you can only call XPutPixel() or XGetPixel() for each
pixel, this not realy an optimized API :)

I think that if we implement a X Protocol subset (may be from XTC)
we also need to design a common ImageData interface for GIF/JPEG/PNG
readers.
May be this already exist with ImageProducer/ImageConsumer ?

> ad (1): I don't see where portability would come in. The way I would
> envision it, there would simply be an alternative Toolkit singleton where
> all the methods that are now natively implemented in wnd.c or evt.c would
> be implemented in Java based on XTC. You either use the Xlib based one,
> or you use the XTC based one.
Not very easy, nativeData is kaffe.util.Ptr, the garbadge
collector don't walk them :(

What we need in a Java X lib for the AWT layer:
- request and event of the X Protocol (done in XTC)
  We don't need all the management of XTC.

- an Image API (XImage in Xlib) (already done in XTC as XTC.Image*)
  We need a common Image API for XTC, libawt, GRX, Win32...

- XLoopupString(), describe in an Annexe of the X Protocol,
  partialy used in clib/awt/X (done in XTC).

- some helper functions that group others requests.
  For example, XStoreName() change the WM_NAME property of the
  window, this is done by ChangeProperty request.
  Or XLoadQueryFont() that send QueryFont and LoadFont requests.

Edouard.

---


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:31 EDT