haxe java SWT externs

54 views
Skip to first unread message

pixelami

unread,
Sep 12, 2012, 5:20:21 PM9/12/12
to haxe...@googlegroups.com
For anyone that's interested,
Some OS X externs for Java SWT (Standard Widget Toolkit),

There is a simple code example of a Webkit browser.

Bon appetit.

Cambiata

unread,
Sep 12, 2012, 10:49:50 PM9/12/12
to haxe...@googlegroups.com
Great!

Any idea what it would take to make it run on windows?

/ Jonas

pixelami

unread,
Sep 13, 2012, 6:28:12 PM9/13/12
to haxe...@googlegroups.com
Hi Jonas,
I think you could just use this fork -  https://github.com/pixelami/java-haxe-extern-creator
(credit to Dr-Emman for the original code) - I just added some stuff to handle some of the cases encountered while generating the SWT externs.

The SWT for windows is here

Once you build the java-haxe-extern-creator jar - you can run it like this.
java -jar java-haxe-extern-creator.jar -source /path/to/swt/src -output path/to/externs/output/folder -packages org.eclipse.swt

Once completed it generates a class called AllThings.hx which you can use to find out if the compiler likes all the generated externs.

In the case of the mac version there are about 4 classes that need small patches made by hand.  But the simple Webkit example compiles without requiring the manual patches.

Otherwise, I might try windows one next week when I have more time.

btw, if the extern generator outputs some errors - it's not always a problem - often just running the generation again will fix them - I think they might be to do with javadoc creation.

Cauê Waneck

unread,
Sep 14, 2012, 10:22:26 AM9/14/12
to haxe...@googlegroups.com
Wow, great work, pixelami!

Thanks :)

2012/9/12 pixelami <alex...@gmail.com>
Reply all
Reply to author
Forward
0 new messages