PureBasic WebGadget — Procedures

WebGadget Procedures (4)

Cr_WebGadget

Embeds a WebGadget / WebViewGadget into a ContainerGadget allowing for borders.

Cr_WebGadget(gadget, x, y, width, height, url.s = #Null$, flags = #Cr_WebGadget_BorderLess)

Cr_WebGadget_Resize

Resizes both the ContainerGadget and embedded WebGadget / WebViewGadget in a single call.

Cr_WebGadget_Resize(gadget, x, y, width, height)

Cr_WebGadget_SetHTML

Loads a WebGadget / WebViewGadget with HTML code.

Cr_WebGadget_SetHTML(gadget, html.s = #Null$, local = #False)

Cr_WebGadget_SetURL

Navigates a WebGadget / WebViewGadget to the specified URL.

Cr_WebGadget_SetURL(gadget, url.s)

WebSocket Procedures (3)

Cr_WebSocket_Close

Attempts to cleanly end the running program.

Cr_WebSocket_Close(HideWindow = #Null)

Cr_WebSocket_Connect

Establishes a network connection to the Chrome DevTools Protocol (CDP) API.

Cr_WebSocket_Connect(PageID.s, PortNumber.l = #Null)

Cr_WebSocket_PageData

Extracts page data from a JSON string into a structured List.

Cr_WebSocket_PageData(*PageData, List PageData.PAGE_DATA())

WebView Procedures (2)

EnableAcceleratorKeys

Enable or disable browser-specific accelerator keys for the WebViewGadget.

EnableAcceleratorKeys(Gadget, Enable)

SetWebViewVisible

Set the visibility of a WebViewGadget, typically used when the parent window is minimized and then restored.

SetWebViewVisible(Gadget, Visible)

PureBasic Procedures (8)

BringWindowToTop

Brings a window to the top of the Z-order, attaching to the foreground thread if necessary.

BringWindowToTop(hWnd, ShowWindow = #True)

CheckInstance

Using the window title as a comparison, checks whether the program is currently running.

CheckInstance(WindowTitle.s, AllowContinue = #True)

ConvertBase64

Returns a PureBasic image created from a Base64-encoded string.

ConvertBase64(Base64_Image.s)

FindPortNumber

Searches the active TCP table and returns a port number in the range 9000–9999 that is bound to 127.0.0.1.

FindPortNumber(PortNumber.l)

ForceActiveWindow

Forces a window to visually appear active without changing actual focus.

ForceActiveWindow(hWnd, AlwaysActive)

GenerateUUID

Generates and returns a random GUID (Globally Unique Identifier), also known as a UUID.

GenerateUUID()

ResizeWindowEx

Animates a window or gadget to a new position and size.

ResizeWindowEx(Window, X, Y, Width, Height, DelayTime = 5)

ValidateURL

Validates a URL and returns it if valid; otherwise, returns an empty string.

ValidateURL(URL.s)