Hi all,

This is the initial working backend implementation of IUP for the web
for Emscripten.
https://github.com/ewmailing/IupEmscripten
(switch to the Emscripten branch)

This pretty much follows the design and architecture I discussed in
the previous discussions these past few weeks.


To try out a finished program, here is the built product of my
Dialog+Button test, I demonstrated in my Mac/iOS/Android video.
http://playcontrol.net/tempdownload/IUP/IupEmscripten/hello.html

Emscripten creates a default html layout. It is geared towards games
and not IUP, so we’ll probably want to make some changes. But don’t
let the current look distract you too much. The important part is the
Button towards the left-button of the page. That is my IupButton.
Click the button and watch it create a new Dialog and Button.
(Subsequent pages are blank so they don’t have the Emscripten look.
Don't forget to disable your pop-up blockers if you don't see new
windows open.)

To reiterate, this is the same single IUP C program. It has been used
to build a native Mac app, a native iOS app, a native Android app, and
now a web page that works natively in the web browser.



For a step-by-step walk through of the core Emscripten fundamentals
needed to implement this, I put up this repository.
https://github.com/ewmailing/EmscriptenBasics

In many respects, it feels a lot like the Android implementation.
Except rather than calling into Java, it calls into JavaScript. (This
felt a lot less painful than JNI though, but not without its quirks
and limitations.)


So two quick things:

- Emscripten does indeed suffer from event loop issues, very similar
to Mac, iOS, and Android. My ENTRY_POINT proposal also solves
Emscripten.

- IUP is rare among cross-platform libraries in that it doesn’t use
explicit annotations to mark the export visibility for public API
symbols, e.g LUA_API in:
LUA_API lua_State *lua_open (void);

Instead Iup is using explicit export files. This has been a small
annoyance so far for my work on Mac, iOS, and Android. But as far as I
can tell, Emscripten doesn’t support export files and must use
annotations. (I am unable to build IUP as a library with Emscripten
right now because of this.)

So I wanted to bring this up in hopes of encouraging an eventual
transition to API annotations.


Finally, now that the architecture is demonstrated as viable, I think
this would make a good Google Summer of Code project.

Thanks,
Eric

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to