Thursday, May 04, 2006
more native xlib awt stuff
Woah! I hacked in kaffe awt up to deep in the night. The rendering of strings inside textfields was broken since a long time! The cursor and the typing was wrong, once enter was hit it worked.
I didn't have big hopes to fix this and I just tried to have a quick look. I discovered that the java part considered the fonts fixed width even if it wasn't and thus returned the wrong charWidth. Without much understanding and even lesser hope I messed inside the native methods!
I was able to understand the faulty logic and implement a new one by accessing the XFontSets and font structures. I queried my first X Atoms!
Although my implementation now is not very robust I think it is definitively correct and now the character width is computed correctly.
The lack of robustness is due that I take the first font struct of a fontset, from a XOC.
in the compulsory screenshot our AWT is running happily on Darwin X11 on MacosX 10.2.8... you may notice how nice the text fields and the file dialogs are!
Monday, May 01, 2006
more swing
I was able to fix further problems in the kaffe AWT ilpementation and to integrate it furthermore with classpath.
Radiobuttons do work now and menus started to be usable too! Most Layouts seem correct too.
Unfortunately some other compontents (like the tabbed pane) still don't work and I don't know how to solve the problem.
The attached screenshot shows the portability of a swing that uses directly X11: it is running on Irix on a SGI Indigo2.
Subscribe to:
Posts (Atom)