Hi all,
I have developed HB_WebView a Harbour wrapper for Webview library.
Webview library is a tiny cross-platform webview library for C/C++ to build modern cross-platform GUIs.
The goal of the Webview library is to create a common HTML5 UI abstraction layer for the most widely used platforms.
It supports two-way JavaScript bindings (to call JavaScript from C/C++ and to call C/C++ from JavaScript).
Now with HB_Webview you can easily bind HB/HMG functions with Javascript, that is, you can call any HB/HMG function from an HTML page.
The first four demos are written in pure Harbour (cross-platform demos), while demo_hmg.prg is an integration of the previous examples integrated into the HMG environment (Windows platform demo).
For example, bind Harbour functions:
context1 = hb_webview_bind2(w, "callHB", HB_CALL_FUNC_INDIRECT) // e.g. call from JS: callHB( "hb_memoread", "text.txt" )
context2 = hb_webview_bind2(w, "callMACRO", HB_CALL_FUNC_MACRO) // e.g. call from JS: callMACRO( 'hb_memoread("text.txt")' )
context3 = hb_webview_bind2(w, "hb_memoread", HB_CALL_FUNC_DIRECT) // e.g. call from JS: hb_memoread( "text.txt" )
context4 = hb_webview_bind2(w, "hb_alert", HB_CALL_FUNC_DIRECT) // e.g. call from JS: hb_alert( "Hello Harbour" )
See documentation in HB_WebView.pdf file.
The source code and demos can be downloaded from: