FLTK in the browser (with FLUID too)

343 views
Skip to first unread message

David Topham

unread,
Aug 25, 2020, 12:35:04 PM8/25/20
to fltkg...@googlegroups.com
That's right! Fabrice Bellard (of QEMU fame) has created a virtual machine using Javascript and Webassembly that runs in the browser!
I tested it, but found that typical IDEs such as gedit, geany, etc. do not work very well. Since it must be small it used Alpine Linux and bogs down a bit from those heavy frameworks.  But FLTK, true to its name works like a charm. I asked Fabrice to install FLDev and FLUID which he did and so far, it is amazing!  Try it:

Right click to get Fluxbox menu, then select FLDev


Matthias Melcher

unread,
Sep 1, 2020, 6:54:02 PM9/1/20
to fltk.general
That is very impressive! I guess that compiling FLTK to run directly in WebAsm would be the next step ;-)

Ian MacArthur

unread,
Sep 2, 2020, 5:07:40 PM9/2/20
to fltkg...@googlegroups.com
On 1 Sep 2020, at 23:54, 'Matthias Melcher' wrote:
>
> That is very impressive! I guess that compiling FLTK to run directly in WebAsm would be the next step ;-)


Yes, I was impressed it worked at all, to be honest, but it was pretty impressive (albeit a wee bit sluggish...)

Compiling fltk to WebAsm is one thing, but we’d need a Window Manager, and I don’t much fancy making a Window Manager out of browser bits...!

Matthias Melcher

unread,
Sep 2, 2020, 6:08:37 PM9/2/20
to fltk.general
Ian MacArthur schrieb am Mittwoch, 2. September 2020 um 23:07:40 UTC+2:
Compiling fltk to WebAsm is one thing, but we’d need a Window Manager, and I don’t much fancy making a Window Manager out of browser bits...!

As long as I can modify pixel data, 90% of what we need is in the Android driver. I implemented drawing and clipping for multiple stacked windows on a single "screen" (bitmap) already. The only thing currently missing is the window decoration, but that is not a huge deal. 

Ian MacArthur

unread,
Sep 3, 2020, 4:41:52 PM9/3/20
to fltkg...@googlegroups.com
Yes, you are right, we do not need a WM at all, really. I was thinking of the demo., which of course *did* have a WM because it was (in effect) running X11 on linux... But just to get fltk in the browser, then a non-windowed “kiosk” mode, like a mobile device, does make more sense...
Still fancy, say, EGL rather than WebAsm as the back end though!


Mo_Al_

unread,
Sep 4, 2020, 1:45:10 PM9/4/20
to fltk.general
I was able to compile FLTK to wasm using emscripten using the X11 backend (modifying the cmake files and removing the VERSION file since it messes with emscripten's clang which uses libcxx version header). It fails unfortunately since most of the X11 functions available are stubs. Apparently the SDL backend is the most supported with emscripten, however FLTK's SDL backend requires a lot of work.
Reply all
Reply to author
Forward
0 new messages