Paul Fisher wrote:

> Jason Osgood <[EMAIL PROTECTED]> writes:
>
> > So...  I'm curious to see if an AWT can be written WITHOUT heavy
> > weight native peers.
>
> You need some level of heavy weight native peers -- in order to
> receive events from the underlying windowing system.  So at a minimum,
> you could get by with only Frames/Windows having peers.

This is wrong. It's only true if you want to run on top of a native
system.
With X11 I can revers it and run the X on top of java fairly easily.
So this is only one way to do it. And not the best  "Java" way.
BTW there is a big difference between a few native methods for speed
and a Native windowing system.

This distinction should be made clear. Today you may need native code in
the graphics engine.
But it would be isolated individual methods written for speed or to
connect to the hardware.

This is the way the Graphics2D is probably written which is the correct
approach.
As Java gets faster the native code can be replaces as needed.
Hotspot will radically alter the performance metric of Java code. So I'm
waiting on it
before I do a lot of native stuff. If Sun actually thinks a head they
will allow access to the hotspot
source. I am convinced I can make a almost pure Java graphics engine
which screams.
And uses all available hardware optimizations in its runtime compile.
I want to move some of the native code into the compiler itself.

Thus a driver would "presents"  a library of routines  with the right
signature which can be inlined into the java code.
This is what I call a Signature Compiler.

I think that it will easily mach today's  C based windowing Systems and
probably beat them handily.

It all depends on Sun from what I've seen so far I will have to wait for
them to invent it.



>

>
>
> While such a minimalist-peer system seems possible, I don't see it as
> being very appealing to implement.
>
> In fact, I find the current thinking on custom lightweight widgets
> vs. windowing system provided widgets to be a little absurd.  We have
> significant groups of people moving in totally different directions.
>
> On one hand, you have JavaSoft moving away from the OS widgets towards
> lightweight widgets.  In fact, when Java was being created, if Gosling
> and the rest of the originals had known about the Tcl/Tk work being
> done within Sun, we wouldn't have the AWT.  Java would be using Tk.
> By the time they found out about Tk, it was too late to switch.
>
> Over in the Tk world, they're moving away from their custom widgets
> towards OS widgets.
>

It's possible for people to move the  wrong way .The problem is they
stopped at the widget level  I'm way beyond that.
I agree if you were discussing widgets then there are plausible arguments
for both approaches.
I want it all : )

> Over in Mozilla-land, they're trying to decide what's the best route
> to take.  They appear to be leaning towards a hybrid approach.
>
> > My Deep Throat believes it would be much more efficient than the
> > current design.  (You remarked on the event round tripping earlier.)
>
> Lightweights only rely upon the peers for receiving events.  Java
> handles screen placement, rendering, everything.  I doubt it would be
> inherently more efficient.  You're moving windowing code away from the
> X11 server (possibly hardware accelerated) and into software.

 Wrong I've worked out the implementation issues.
With hotspot it makes tons of sense to go the Java route.
In fact hotspot is about perfect for graphics code. With some minor
adjustments.
It should actually produce faster graphics code than C based designs.
The Asm game stuff will beat it but not by  a whole lot.
And if it becomes popular a little bit of hardware support will put a
Hotspot/Sig Compiler on par
with Human optimized  asm.

>
>
> I don't know how it is on your system, but SwingSet is slow on my
> computer.  I love watching the screen redraw. :)

It's quite fast for me its actually the AWT peers that are slow.
PlusSwing depends on the event thread for drawing. So if you block the
event thread no draw.  This is not the best design IMHO.
I'm no big fan of the Swing but sometimes you have to "love the one your
with".
It's pissed me off a time or too. But what's really frustrating is I
can't do anything about it.
If it was open I'd work to make it better. Ring now  it's a interim
solution Unless Sun changes
there style. There are more open source lightweight toolkits out every
day. My stuff may even
encourage there development since it allows them to present the
AWT interface easily.


>
>
> > Also, cross platform discrepancies would mostly go away.
>
> You can also get rid of platform discrepancies by porting the native
> toolkit.  Gtk+ has already been ported to Win32, and it might
> eventually have a Mac port.

My stuff ports to Windows and the Mac and OS/2 and .. by downloading it
and typing java : )


>
>
> > The font stuff in Graphics would have to be in software.  How much
> > work is that?
>
> There's a big difference between using Swing to function mostly as an
> AWT replacement (for widgets), and totally replacing all functions of
> the peers -- most importantly -- the graphics context (GC), which is
> what you seem to be advocating.

I have working bitmap fonts I'm waiting for Java2D before really
attacking them thereis a all Java version for freetype  I have it . Its a
good start.
http://ds.dial.pipex.com/town/close/gap59/freetype.shtml

>
>
> > I think interoperability with native drag-n-drop would be feasible.
> > My impression is the threading issues would be MUCH simpler.



>
>
> Gtk+ has already solved these problems for us.  I'm not for
> reinventing the wheel, especially when it means loosing important
> functionality provided by the X11 server and Gdk.

You don't have to I am. But I prefer to call it refining the wheel  : )
There's a big difference between toady's Aluminum Allow wheels and a 12
century Ox Cart wheel.
You can ride in the Ox cart I 'll take the alloy rims on the Ferrari .
If you can't see what I do then there is no sense in arguing.
You won't be the first engineer that said  what I was doing is stupid.
I believe in my abilities and good research.  I need less than ten people
in the whole world who agree
with me and see where I want to go. How many people did it take to start
Linux.
But of  course :

     I'm not for reinventing the wheel, especially when it means loosing
important
     functionality provided by the X11 server and Gdk.

Thank god you did not work on the early Linux releases.




>
>
> On a side note, the Gtk+ peers are almost complete. :)
>

When you get the AWT done I want to use it.
No hard feelings but I don't stand down from a argument.
Just becuase your working on the GTK peers doesn't mean you understand my
solution.
I worked a lot on the 1.02 JDK port to Nextstep and have to access the
Java sources for work
so I can't contribute to Classpath.


I started from the hardware and worked my way up in Java. As far as I
know
I'm the world's authority on  Open Java Windowing Systems. Sun and
IBM aren't telling
but there not stopping work on Java based device drivers either.
You don't have to believe me figure out what Sun and IBM are up too.
I know I'm not the only one to figure this out but I'm the only one who
thinks is should be open and free.

Anyway if I get a chance the code will be out any day now. I't was
supposed to go out this weekend.
I'm one bug away from a  robust  0.1 release.
Read it  then  we can argue.

Mike



Reply via email to