examples/

directory
v2.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: Apache-2.0

README

Energy example

In Energy, CEF combined with LCL can make various applications

CEF: HTML + JS + CSS

LCL: Various system native UI components

CEF is a multi-process mode, by default (no standalone sub-process set) it repeatedly starts the current executable to start multiple processes, including (PtBrowser/PtRenderer/PtZygote/PtGPU/PtUtility/PtBroker/PtCrashpad/PtOther). When writing code, we need to pay special attention to most of the cases we write the main function in the main process, that is, the PtBrowser main process, energy provides the main process to execute the callback function, we need to write the main function in the main process callback function, if the main function or init function is written anywhere These function functions will be executed (repeatedly) when the child process is started, which may cause unexpected errors. You can also distinguish the main sub-process by setting up independent sub-processes, so that you don't need to consider the problem of repeated execution errors, and the main function or init function can also be written in any position, the principle is that after the main process (PtBrowser) is successfully started, the main process application. The SetBrowserSubprocessPath("sub.exe) function sets the pathname of the child process execution file The child process is a separate execution file that does not need to write any major functions. Example program: sub-process

Example Name Example Description
app-icon-gen Windows application icon generation, Linux and macOSX not provided
audio-video Music and Videos
build-examples build all example
clipbrd clipbrd
context-menu Customize right-click menu
control-widget The state control of page control refresh, forward, backward, and stop refresh based on LCL components can be combined with various system components in Energy
cookie Setting, obtaining, and deleting cookies
cookie-manager Cookie Management
custom-drag-window custom-drag-window
dev-tools Developer Tools
dom-visitor Document operation display
download Download files
drag-file Drag and drop the file into the browser window
execute-dev-tools-method Execute Developer Tool Method
execute-javascript Executing JS code in the page in Go
flash-for-cef-v87 Borderless Window
frameless Borderless Window
i18n Local multilingual adaptation
internal-http-server Internal Services
ipc-on-emit Event monitoring and triggering for Go and JS
key-event Keyboard events in HTML
lib-checkupdate energy and liblcl update examples
load-html-url Display the loaded Html string or Url address on the page
msgbox LCL based system prompts
osr osr
popup-sub-window Pop up sub window
print-pdf Printing pages as PDF documents
process-type When there are multiple processes, the process type
proxy Proxy configuration
response-filter Resource response filtering
scheme Custom protocol topics, such as http instead of hello
screen Search page text
search-text screen
sys-dialog Various modal functional Windows
sys-menu System menu
tempdll underlying library is built into the execution file and released at run time
tray Tray - Custom and system tray
view-source Display page source code
vue Example of html+vue
webkit-register webkit callback functions register local js examples
window Window operation management
windows Examples that support windows only
zoom Zoom in and out of the page
simple Simple application example
sub-process Multiprocess, starting the rendering process as a child process
dev-test examples of various tests at development time
... ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL