Page 1 of 5

HB_WebView (a cross-platform Webview library)

Posted: Thu Mar 13, 2025 11:35 pm
by srvet_claudio
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.

Roberto's dream is now a reality!
With HB_Webview can now be easily bind with Roberto's JMG (https://www.hmgforum.com/viewforum.php?f=50).

Demos written in pure Harbor (cross-platform demos):

demo1.prg - Web browsing in Harbour
demo2.prg - Binding Harbour functions (calling HB functions from Javascript)
demo3.prg - Inspecting DBF files with Javascript
demo4.prg - Injecting PRG code written entirely in Harbour from JavaScript
demo5.prg - Querying SQLite from Javascript
demo6.prg: You can navigate the directory tree and open files that are in the list of allowed extensions (new instances of HB_WebView are created entirely from Javascript code).

Demos in HMG:
demo hmg.prg - is an integration of the previous examples integrated into the HMG environment (Windows platform demo)

See documentation in HB_WebView.pdf file.

I hope it is useful to you!

Best Regards,
Claudio

PS: in batch files attachment the compiler path was established as C:\hmg.3.6\

Re: HB_WebView (a cross-platform Webview library)

Posted: Fri Mar 14, 2025 12:49 am
by Steed
Thanks a lot !!!

Re: HB_WebView (a cross-platform Webview library)

Posted: Fri Mar 14, 2025 4:10 am
by teocoy
Excelente iniciativa, muchas gracias por compartir

Re: HB_WebView (a cross-platform Webview library)

Posted: Fri Mar 14, 2025 8:03 am
by serge_girard
Thanks and great to see you back!

Serge

Re: HB_WebView (a cross-platform Webview library)

Posted: Fri Mar 14, 2025 2:43 pm
by serge_girard
This gives us new possibilities !
Very exited to have a new project for this...

Resizing is now standard!

Do you plan to extend or something. Is this a test-version or production ready? You plan manual or some basic instruction PDF?

Many thanks, so far it is working fine.

Serge

Re: HB_WebView (a cross-platform Webview library)

Posted: Fri Mar 14, 2025 4:12 pm
by srvet_claudio
Hi Serge,

Yes, hb_webview is ready for production.

As for the documentation, I'm indebted. But it's very easy to use; the main functions of the lib are in the demos.

Re: HB_WebView (a cross-platform Webview library)

Posted: Fri Mar 14, 2025 4:25 pm
by serge_girard
OK, I managed to change a bit and that worked fine.
Thanks again!

Serge

Re: HB_WebView (a cross-platform Webview library)

Posted: Sat Mar 15, 2025 10:13 am
by serge_girard
Claudio,

Is there a (short) way to 'Show pagesource' (Full HTML) like in Edge or Chrome? Rightclick on page...

Serge

Re: HB_WebView (a cross-platform Webview library)

Posted: Sat Mar 15, 2025 10:43 am
by srvet_claudio
Hi Serge,
and with devtools (ctrl+shift+i)?

Re: HB_WebView (a cross-platform Webview library)

Posted: Sat Mar 15, 2025 12:04 pm
by serge_girard
Ctrl+Shift+I will open but not all elements...

I want complete HMTL to copy to clipboard and save as an HTML file in order to see/inspect result. Now i must click every arrow...
See att.
webv.png
webv.png (41.34 KiB) Viewed 4457 times
Not crucial but nice to have... or maybe some hidden shortcut?

Serge