Chromium WebGadget v4

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

Re: Chromium WebGadget

Post by skinkairewalker »

you are amazing, thank you so much for the support ! I'm very happy with the result...
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Hi skinkairewalker,

Thank you, that's great to hear, happy coding.

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

Updated the FREE binaries to include CrWG Builder, currently a work in progress.

If you're interested in a PureBasic application with a modern user interface, please take the time to download the FREE binaries and demo CrWG Builder. In addition, all examples have been recompiled with the latest framework updates including various improvements.

When CrWG Builder is completed, the final version will include all dependencies (HTML, CSS, JS, etc.) compiled into the executable.

NB*: Running an example for the first time creates a new browser profile causing it to open slower than it normally would.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Updated:
- improved splash window (all examples)
- improved Bootstrap Modern UI examples
- restructured Bootstrap Modern UI folders
- updated Bootstrap to 5.1

Splash Window now supports transparency which will be needed later for CrWG Builder.

CrWG Builder is much further along and should already provide enough useful information to help use the framework.
Last edited by JHPJHP on Thu May 18, 2023 4:23 am, 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:
- added Dark Mode to CrWG Builder (default)
-- various CSS and JavaScript tricks to emulate an app and not a webpage
- numerous minor improvements to all examples
- updated Bootstrap to v5.3 Alpha 1
Last edited by JHPJHP on Thu May 18, 2023 4:24 am, edited 2 times in total.
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Chromium WebGadget

Post by ricardo »

Hi JHPJHP,

Your codes are really great and your support is amazing.

JHPJHP is also an hinest person, when i purchase or donate twice for the key because i was confused, he gave me a refund because he advice me about that.

And at the end he help me to resolv my question and my code is already running.

I really recommend his codes, are great and he is vey hekpfull and nice person.

Thank you JHPJHP
ARGENTINA WORLD CHAMPION
User avatar
Caronte3D
Addict
Addict
Posts: 1014
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Chromium WebGadget

Post by Caronte3D »

+1 :wink:
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Hi ricardo, Caronte3D,

Thank you!

At one time or another every programmer has experienced programming fatigue, and I'm no exception. But your kind words, acknowledgement, and interest in some of the things I've written has gone a long way to "stemming the tide"; it's what keeps me coming back.

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

Updated:
- added CrWG Framework\Framework Examples\IAccessible_Navigate.pb
- various improvements to the framework
- minor improvements to some examples

NOTE: This is a recommended update due to the improvements to the framework.

IAccessible_Navigate.pb
The IAccessible Interface is left over code from the first version of the framework and has been superseded by the DevTools Protocol.

Image
Last edited by JHPJHP on Fri Mar 24, 2023 9:35 pm, edited 5 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Updated:
- improved full-screen effect for videos
- minor improvments to DevTools_Player.pb

Full-Screen
Included ResizeWindowEx for a smoother transition.

DevTools Player
One of these improvements was adding a cyan colored dot to display a tooltip when the mouse pointer moves over it.
Because the example uses a random port number to connect DevTools, the tooltip can be used to access the player remotely.
Using the Video Remote App located in the ISAPI PWApps folder, the DevTools Player can be controlled from your smart phone.

Image Image
Last edited by JHPJHP on Fri Mar 24, 2023 9:36 pm, edited 6 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Updated:
- improved framework
- improved all examples
- improved standalone Remote Command
- squashed a couple bugs

Squashed Bugs
After my previous update to the framework I neglected to test all the examples.

NOTE: This is a recommended update due to the fixes and improvements to the framework and examples.

Image
Last edited by JHPJHP on Thu May 11, 2023 3:58 pm, edited 1 time in total.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 625
Joined: Fri Dec 04, 2015 9:26 pm

Re: Chromium WebGadget

Post by skinkairewalker »

Is it possible to leave the window in full screen to use as games?

I tried to use the maximum resolution of the machine + #PB_Window_BorderLess, but it got a bit strange...
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Hi skinkairewalker,

Added another example: General_Fullscreen.pb.
The example uses JavaScript to toggle Fullscreen while the window is auto resized using the CrWG framework.

The following code demonstrates a second option, Fullscreen only (no toggle), but would be simple enough to extend.

Code: Select all

Enumeration
  #MainWindow
  #Cr_WebGadget
EndEnumeration

#Cr_WebGadget_User_Directory_Name     = #PB_Compiler_Filename
#Cr_WebGadget_User_Directory_Override = #True

IncludeFile "..\Shared Files\includes\sources.pbi"

Procedure KeyboardHook(nCode, wParam, *lParam.KBDLLHOOKSTRUCT)
  Shared KEYBOARDHOOK, CloseWindow

  If nCode = #HC_ACTION
    Select *lParam\vkCode
      Case #VK_ESCAPE
        Select wParam
          Case #WM_KEYUP
            CloseWindow = #True
            ProcedureReturn #True
        EndSelect
    EndSelect
  EndIf
  ProcedureReturn CallNextHookEx_(KEYBOARDHOOK, nCode, wParam, *lParam)
EndProcedure

GetWindowRect_(GetDesktopWindow_(), @lpRect.RECT)
WindowWidth = ScaleFactorD(lpRect\right)
WindowHeight = ScaleFactorD(lpRect\bottom)

If OpenWindow(#MainWindow, 0, 0, WindowWidth, WindowHeight, "Fullscreen", #PB_Window_BorderLess)
  Cr_WebGadget(#Cr_WebGadget, 0, 0, WindowWidth, WindowHeight, #CrWG_Style_BorderLess)
  crwg_data.CrWG_DATA
  crwg_data\GadgetNumber = #Cr_WebGadget
  crwg_data\SourceURL = "https://start.duckduckgo.com"
  Cr_WebGadget_Init(crwg_data)
  KEYBOARDHOOK = SetWindowsHookEx_(#WH_KEYBOARD_LL, @KeyboardHook(), #Null, 0)
  Repeat : WaitWindowEvent(50) : Until CloseWindow
  UnhookWindowsHookEx_(KEYBOARDHOOK)
EndIf
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 625
Joined: Fri Dec 04, 2015 9:26 pm

Re: Chromium WebGadget

Post by skinkairewalker »

that's wonderful, now it's good to make games ...
thank you very much for the support !
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Hi skinkairewalker,

You are most welcome; I look forward to your first game using the framework.

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

Updated:
- improved framework
- squashed a framework bug

Improved Framework
If you're familiar with my coding style you know that I don't use EnableExplicit. It's not that I'm against using the compiler directive, but I'm also not adamant that it must be used, even though under many conditions it has proven to be a benefit. Well, a distributed shared framework is a condition where it's not only a benefit but also a requirement.

The improvements are in whole thanks to infratec who painstakingly included Defined and Protected variables to comply with EnableExplicit.
Last edited by JHPJHP on Mon May 15, 2023 8:13 pm, edited 1 time in total.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 625
Joined: Fri Dec 04, 2015 9:26 pm

Re: Chromium WebGadget

Post by skinkairewalker »

first, I would like to thank you for the excellent work, and for the dedication to this incredible project that complements the best tool to create genius software " PureBasic ".


Is it possible to leave the webview as if it were a layer over the native interface or even games using Ogre?
just a kinda crazy question that came to my mind with the intention of creating better interfaces for games ( GUI ) …. 🥲
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Chromium WebGadget

Post by JHPJHP »

Hi skinkairewalker,

Thank you, it's nice to hear the stuff I've written may find a use.
skinkairewalker wrote:Is it possible to leave the webview as if it were a layer over the native interface or even games using Ogre?
Unfortunately, something like that isn't possible, but even if it could be hacked there are much better approaches...

If you're already thinking about creating games with Ogre, then "creating better interfaces" using the Ogre engine seems the obvious choice.

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

Updated:
- added compiler option
- minor improvements to Fullscreen
- updated Bootstrap to v5.3 Alpha 3

Compiler Option: #Cr_WebGadget_Fullscreen_Animate_DelayTime
Set the delay time in milliseconds the window uses to animate Fullscreen; default is zero, no animation.

NB*: The examples DevTools_Player.pb and General_Fullscreen.pb now demonstrate the new compiler option.
Last edited by JHPJHP on Thu Apr 20, 2023 3:40 pm, edited 8 times in total.
Locked