Chromium WebGadget v4

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 627
Joined: Fri Dec 04, 2015 9:26 pm

Re: Chromium WebGadget

Post by skinkairewalker »

awesome, thanks by attention :lol:
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 627
Joined: Fri Dec 04, 2015 9:26 pm

Re: Chromium WebGadget

Post by skinkairewalker »

If you are interested in creating builds for MacOs, I make my mac available remotely so you can work as you wish...
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Hi skinkairewalker,
skinkairewalker wrote:If you are interested in creating builds for MacOs, I make my mac available remotely so you can work as you wish.
Thank you for the offer, but currently I have no plans extending the framework to include additional OS.

----------------------------------------

NOTE: Updates to Chromium WebGadget and various other downloads are ongoing but may not be posted to the forum.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Updated:
- added \CrWG Framework\Framework Examples\DevTools_TabBar.pb
- various improvements to numerous examples
- small improvement to the framework

DevTools_TabBar.pb
Thanks to STARGÅTE and the TabBarGadget, it was a lot easier adding browser like tabs to the Chromium WebGadget.

Code: Select all

;|-------------------------------------------------------------------------------------------------
;|
;|  Title            : TabBarGadget
;|  Version          : 1.5 Beta 2a (2019-03-25)
;|  Copyright        : UnionBytes
;|                     (Martin Guttmann alias STARGÅTE)
;|  PureBasic        : 5.20+
;|  String Format    : Ascii, Unicode
;|  Operating System : Windows, Linux, MacOS
;|  Processor        : x86, x64
;|
;|-------------------------------------------------------------------------------------------------
;|
;|  Description      : Gadget for displaying and using tabs like in the browser
;|
;|  Forum Topic      : https://www.purebasic.fr/german/viewtopic.php?f=8&t=24788
;|                     https://www.purebasic.fr/english/viewtopic.php?f=12&t=47588
;|  Website          : https://www.unionbytes.de/libs/tabbargadget/
;|
;|  Documentation    : https://help.unionbytes.de/tbg/
;|
;|-------------------------------------------------------------------------------------------------
Last edited by JHPJHP on Thu May 11, 2023 4:17 pm, edited 2 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Updated:
- squashed a couple bugs in the example DevTools_TabBar.pb

This is a dynamic example that can auto-add new tabs, update the icon and tab text when a webpage has changed, handle such menu actions as "Open link in new window", "View page source", etc., and much more.
Last edited by JHPJHP on Thu May 11, 2023 4:16 pm, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Updated:
- added window resizing
- added dynamic address bar
- improved graphics
- improved icon download

Icon Download: Replaced ReceiveHTTPFile with ReceiveHTTPMemory.
Last edited by JHPJHP on Tue May 09, 2023 7:00 pm, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget v3

Post by JHPJHP »

The Chromium WebGadget has been updated to version 3

While working on the tab bar example I noticed several issues that could only be addressed if major changes were made to the framework.

One of the first things to go was the IAccessible Interface. All web navigation must now be done through the DevTools Protocol.

The embedded browser now starts in kiosk mode which removes the need to hide the address bar and tabs.

1. The DevTools Protocol is now enabled by default.
2. Only the first initialized WebGadget can receive DevTools commands.
3. Access to the context-menu is not available.
4. Interfacing with full-screen mode is no longer handled by the framework; see example DevTools_Player.pb.
5. Every example has been updated and some examples have been removed.

There have been numerous improvements that were not mentioned in this post.

NOTE: The example DevTools_TabBar.pb is a work in progress, currently only one tab is available for testing.
Last edited by JHPJHP on Tue May 09, 2023 9:17 pm, edited 3 times in total.
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Chromium WebGadget v3

Post by infratec »

Point 2 on your list is a 'game breaker'.
If I can only run one Webgadget, your Webgadget can never be used in my applications.
I use one to show the main GUI with React framework and websockets, and others to show contents.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget v3

Post by JHPJHP »

Hi infratec,

Chromium WebGadget v3 has been updated to address your concerns...
My previous post now reads "2. Only the first initialized WebGadget can receive DevTools commands."

Things to Know:
1. Main include file has been renamed to Cr_WebGadget.pbi.
2. The Constant #Cr_WebSocket_Enable_DevTools_Protocol is now obsolete.
3. The following bit of code is now part of the include file.

Code: Select all

Enumeration #PB_Event_FirstCustomValue
  #CrWS_Event_Port_Listen_Connection
EndEnumeration
4. There are two new Constants:
--- #Cr_WebGadget_Enable_Multiple_Tabs: Not only for multiple tabs, but also if your application requires caching.
--- #Cr_WebGadget_Idle_Timeout_Minutes: The browser will close after the timeout, but first a warning message is displayed.

In addition, see the examples for improved algorithms to some of the more common script elements.
Last edited by JHPJHP on Tue May 09, 2023 3:40 pm, edited 2 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget v3

Post by JHPJHP »

Updated:
- bug fixes and improvements to the framework
- added Constant: #Cr_WebSocket_Enable_DevTools_Debugger
- updated all relevant examples to accept the debug option
- renamed the Procedure DevToolsEvent to DevToolsCallback in all relevant examples
- renamed all framework examples

Constant: #Cr_WebSocket_Enable_DevTools_Debugger
0ption to Debug events generated from the DevToolsCallback Procedure.
See the updated example \CrWG Framework\Framework Templates\CrWG_Template.pb.
Last edited by JHPJHP on Mon May 15, 2023 8:13 pm, edited 2 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget v3

Post by JHPJHP »

Updated:
- framework additions and improvements
- completed the example DevTools_TabBar.pb
- some minor improvements to numerous examples

DevTools_TabBar.pb
Tab bar browser in under 800 lines of code. Includes buttons for navigation, a functional address bar and history window.

Notes About DevTools Events
There are literally thousands of Command combinations to control a browser, at the heart of this is the DevtoolsCallback Procedure.

Send a three-line Command consisting of a user-defined Event ID with Method and Params.

Code: Select all

SendData\EventID = 20300
SendData\Method = "Page.navigate"
SendData\Params = #DQUOTE$ + "url" + #DQUOTE$ + ":" + #DQUOTE$ + "https://www.google.com" + #DQUOTE$
The DevtoolsCallback Procedure is used to extract, manipulate, process retuned (JSON formatted) data, and/or daisy-chain a second, third, etc. number of Commands to achieve a desired result.

It's almost never a good idea to send two Commands back-to-back, instead, test for the user-defined Event ID, and either send the next Command from the callback Procedure when the previous one is received or use the PostEvent function back to the main loop to pass data and/or send your next Command.
Last edited by JHPJHP on Sun May 21, 2023 6:37 pm, edited 3 times in total.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 627
Joined: Fri Dec 04, 2015 9:26 pm

Re: Chromium WebGadget v3

Post by skinkairewalker »

for some reason, every example of the new version gives the error :
screenshot > https://prnt.sc/ZOjfuxZ1CjZX

what could be happening?
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget v3

Post by JHPJHP »

Hi skinkairewalker,

Please download the latest version.
Reboot your computer before testing the examples.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 627
Joined: Fri Dec 04, 2015 9:26 pm

Re: Chromium WebGadget v3

Post by skinkairewalker »

the problem still persists... in the "old" version it runs normally.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget v3

Post by JHPJHP »

Hi skinkairewalker,

Please download the latest version.

Various changes were made throughout the day; another update was posted just a few minutes ago.
Locked