Hi,
I have the need to use the WebGadget for displaying stuff in our cross platform tools. But sadly, I struggle with the PureBasic WebGadget:
1) I have to save all content to files first, because SetGadgetItemText() works only on Windows.
2) GetGadgetItemText() seems the only option to get some information out. But only works on Windows.
3) Navigation callback only works on Windows. Really missing that...
4) Linux and Mac showing border around the gadget, Windows not. I can enable on WIndows using API, but I can't disable for Linux and MacOS. At least, I found no reliable way.
5) Looks like the PB WebGadget is broken on some more recent Linux Distributions. Or at least, it gets harder to find working distributions (see forum). So I have more support cost on such systems (users ask us how to make our software run).
In general, I'm missing control over the gadget itself and what happens inside.
I thought about embedding of Gecko, but Mozilla dropped support: https://developer.mozilla.org/en-US/doc ... ding_Gecko
WebKit seems very complicated to me.
Would be really great if there was a library (dll, so and dylib) which allows to create own web-render gadgets and control that in more detail.
Any ideas?
[update]Maybe BLINK is an option? http://www.chromium.org/blink It is the rendering engine of Chromium, Opera etc.[/update]
Is it possible to use another cross platform web gadget?
Re: Is it possible to use another cross platform web gadget?
Setting html code directly should work on MacOS as well.
Maybe CEF (Chromium Embedded Framework) would also be an option.
Maybe CEF (Chromium Embedded Framework) would also be an option.
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
Re: Is it possible to use another cross platform web gadget?
Sound interesting. I will have a look!wilbert wrote:Maybe CEF (Chromium Embedded Framework) would also be an option.
- the.weavster
- Addict
- Posts: 1537
- Joined: Thu Jul 03, 2003 6:53 pm
- Location: England
Re: Is it possible to use another cross platform web gadget?
This looks like it could be interesting.
Re: Is it possible to use another cross platform web gadget?
idle did some tests with webview a few weeks ago...
Et cetera is my worst enemy
Re: Is it possible to use another cross platform web gadget?
Note that while the interface is cross-platform, each platform uses its own native renderer and therefore may display pages differently.chi wrote:idle did some tests with webview a few weeks ago...
Re: Is it possible to use another cross platform web gadget?
The webview gadget just has the added ability to inject js and css, so you can call Js functions
and have js functions call PB functions.
As far as html5 support goes it's still limited. Importing cef would be easy enough but it's seriously large
an other alternative would be scitter, though it's not MIT.
After looking into the issue I decided the easiest way to go was to use an embedded http server and at my clients request
I made it an in memory embedded http / https server which can then be used to serve to a web gadget or the local browser.
You then have the choice to use a JS framework with ajax or do server side preprocessing of the html.
I'm currently looking at doing the server side preprocessing but am still trying to decide on how to tag the html
to do replacements from callbacks.
See Civet_Server thread
viewtopic.php?f=27&t=70995
or git
https://github.com/idle-PB/pb_civet_server
and have js functions call PB functions.
As far as html5 support goes it's still limited. Importing cef would be easy enough but it's seriously large
an other alternative would be scitter, though it's not MIT.
After looking into the issue I decided the easiest way to go was to use an embedded http server and at my clients request
I made it an in memory embedded http / https server which can then be used to serve to a web gadget or the local browser.
You then have the choice to use a JS framework with ajax or do server side preprocessing of the html.
I'm currently looking at doing the server side preprocessing but am still trying to decide on how to tag the html
to do replacements from callbacks.
See Civet_Server thread
viewtopic.php?f=27&t=70995
or git
https://github.com/idle-PB/pb_civet_server
Windows 11, Manjaro, Raspberry Pi OS
Re: Is it possible to use another cross platform web gadget?
Several time I have already tried to help you out with implementing some of the missing WebGadget functions for MacOS or Linux. To combine all these efforts I have posted 2 cross-platform examples which demonstrate how to implement a navigation callback and these 4 important WebGadget functions:Kukulkan wrote:I have the need to use the WebGadget for displaying stuff in our cross platform tools. But sadly, I struggle with the PureBasic WebGadget:
1) I have to save all content to files first, because SetGadgetItemText() works only on Windows.
2) GetGadgetItemText() seems the only option to get some information out. But only works on Windows.
3) Navigation callback only works on Windows. Really missing that...
- GetGadgetItemText(#WebGadget, #PB_Web_HTMLCode)
- GetGadgetItemText(#WebGadget, #PB_Web_PageTitle)
- GetGadgetItemText(#WebGadget, #PB_Web_SelectedText)
- SetGadgetItemText(#WebGadget, #PB_Web_HTMLCode, HTML$)
By the way, although SetGadgetItemText(#WebGadget, #PB_Web_HTMLCode, HTML$) is documented to only work on Windows, it also seems to work fine on MacOS...
Re: Is it possible to use another cross platform web gadget?
Hello Shardik,
I know and I already use these in our products. Thank you for the combination! But for Linux, the Webgadget starts to make problems because on some distros it seems broken (see discussions here in the forum). Users with Windows Explorer 11 can not print (a Windows bug which is not becoming fixed on Windows 7) and I still found no way to disable the border on all target OS (Win, Lin and Mac).
So I thought that some replacement would be better. We did the same by using libcurl directly because the PB implementation is not sufficient (especially SSL/TLS smtp and some other things around keeping connections open). But some external webgadget is around 150MB (compressed) and this is very much!
Anyway, I will try again to workaround all the limitations.
I know and I already use these in our products. Thank you for the combination! But for Linux, the Webgadget starts to make problems because on some distros it seems broken (see discussions here in the forum). Users with Windows Explorer 11 can not print (a Windows bug which is not becoming fixed on Windows 7) and I still found no way to disable the border on all target OS (Win, Lin and Mac).
So I thought that some replacement would be better. We did the same by using libcurl directly because the PB implementation is not sufficient (especially SSL/TLS smtp and some other things around keeping connections open). But some external webgadget is around 150MB (compressed) and this is very much!
Anyway, I will try again to workaround all the limitations.