i wrote a C-wrapper for the C++ API of Awesomium. I made it a Google Code project
. Based on that wrapper i wrote a JNA bridge so we can have nice things in Java as well.
You can find the code for it at here
as part of libgdx. It's totally self-contained though with only a dependency to JNA. The code is Apache 2 and the version of awesomiumc i use i license as Apache 2 as well
So the Java wrapper is totally free to use. The only caveat is that Awesomium itself is only free for non-commercial projects, indie licenses are 300$ atm.
So what is this all about? Here's an image:
This is an OpenGL Java application displaying the output of Awesomium on a simple quad. I also inject keyboard and mouse events into the Awesomium instance. As you can see it renders a Youtube video (it also plays audio of course). Awesomium is an off-screen web engine based on Chromium that is intended to be used for apps like games. We can use this in Java now as well. There's a couple of restrictions though:
- Windows only at the moment. Awesomium also supports MacOS but i don't have a Mac to compile the c-wrapper on. Volunteers welcome.
- 32-bit only at the moment. This is again a limitation of Awesomium itself, you'll need a 32-bit VM to run any app using Awesomium. No idea whether that will change in the future.
you can download a self-contained jar. It's 20mb due to the shared lib of Awesomium being a huge mofo. My server is slow so give it some time. Once downloaded put it in its own folder as it will unpack a couple of things. Start it up (on a 32-bit VM) and browse away. I don't pipe all keycodes to Awesomium yet, the same is true for the scrollwheel events. Other than that everything should work. Oh, you can also resize the window for profit...
The code for that little demo based on libgdx can be found at http://code.google.com/p/libgdx/source/browse/trunk/extensions/awesomium/gdx-awesomium-tests/src/com/badlogic/gdx/awesomium/GLTest.java?r=1251
. Yes, it is not the most beautiful code ever but it does the job.
I plan on wrapping Berkelium as well as its BSD and available for all mainstream OS out there. Will take some time.