= PJWIN - Portable Mobile Windowing Toolkit = == Objective == Develop a simple, small-footprint GUI toolkit to build simple applications that are portable across platforms, especially mobile platforms. The '''exact same''' GUI source code should be portable across these platforms: - Windows - Windows Mobile Professional/PocketPC platform (i.e. with touch interface) - Windows Mobile Standard/Smartphone platform (i.e. without touch) - Symbian/S60 3rd edition - (optional) console application - (optional) Qt application == Basic idea == The basic idea is to use XUL-like interface (see [http://www.mozilla.org/projects/xul/ XUL], and [https://developer.mozilla.org/en/XUL_Tutorial XUL tutorial]), but much more simplified. === Sample interactions === 1. Describe the window using XUL-like syntax (the code below is all over the place but hopefully you get the idea): {{{ const char *xml = " "; }}} 1. Create the window using the XUL XML description: {{{ window *wnd = create_window(xml); }}} 1. For modal dialog, start the dialog, giving it callback function to receive events from the window: {{{ do_modal(wnd, &event_handler); }}} 1. Do some code in the event handler: {{{ void event_handler(window *wnd, event *event) { if (event->type==COMMAND && pj_strcmp2(&event->element, "quit")==0) end_dialog(wnd); else if (event->type==COMMAND && pj_strcmp2(&event->element, "about")==0) msgbox("hello world"); } }}} 1. And that's it! === Screenshots === TBD. Basically, on Smartphone and S60, the command bar will be implemented as menu, while on Win32 it will be as buttons, while on PPC it may be implemented as menu or buttons. == The GUI elements == Supported elements: * window * hbox and vbox * spacer * label (static text) * command bar (will be translated into buttons or menu on interface with touch capability, or into menu on the rest) * edit/input control * combo box control (advanced) * list control (advanced) Unsupported elements: * button (it's only most usable with touch interface)