U: all demo, windows import syso

This commit is contained in:
杨红岩 2024-04-13 22:13:04 +08:00
parent d1fda09064
commit a72dadff32
58 changed files with 62 additions and 4 deletions

View File

@ -15,6 +15,7 @@ import (
"fmt"
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
)

View File

@ -18,6 +18,7 @@ import (
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/common"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/types"

View File

@ -6,6 +6,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
)

View File

@ -3,6 +3,7 @@ package main
import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/examples/control-widget/src"
_ "github.com/energye/energy/v2/examples/syso"
)
func main() {

View File

@ -4,6 +4,7 @@ import (
"fmt"
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"os"
"path/filepath"

View File

@ -8,6 +8,7 @@ import (
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/cef/ipc/context"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
"time"

View File

@ -4,6 +4,7 @@ import (
"embed"
"fmt"
"github.com/energye/energy/v2/cef"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
)

View File

@ -5,6 +5,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
"github.com/energye/energy/v2/consts/messages"
_ "github.com/energye/energy/v2/examples/syso"
et "github.com/energye/energy/v2/types"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/api"

View File

@ -9,6 +9,7 @@ import (
"github.com/energye/energy/v2/cef/ipc/types"
"github.com/energye/energy/v2/cef/process"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
//_ "net/http/pprof"
)

View File

@ -5,6 +5,7 @@ import (
"fmt"
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/ipc"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
)

View File

@ -5,6 +5,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
)

View File

@ -8,6 +8,7 @@ import (
"github.com/energye/energy/v2/cef/ipc/context"
"github.com/energye/energy/v2/consts"
"github.com/energye/energy/v2/examples/common/utils"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
)

View File

@ -4,6 +4,7 @@ import (
"embed"
"fmt"
"github.com/energye/energy/v2/cef"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
"time"

View File

@ -3,6 +3,7 @@ package main
import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"os"
"path/filepath"

View File

@ -18,6 +18,7 @@ import (
"github.com/energye/energy/v2/cef/ipc/context"
"github.com/energye/energy/v2/common"
"github.com/energye/energy/v2/examples/common/tray"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
et "github.com/energye/energy/v2/types"
"github.com/energye/golcl/lcl/rtl/version"

View File

@ -12,6 +12,7 @@ package main
import (
"github.com/energye/energy/v2/cef"
_ "github.com/energye/energy/v2/examples/syso"
)
func main() {

View File

@ -7,6 +7,7 @@ import (
"github.com/energye/energy/v2/common"
"github.com/energye/energy/v2/consts"
"github.com/energye/energy/v2/examples/helper-process/app"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/pkgs/macapp"

View File

@ -6,6 +6,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/examples/ipc-on-emit/go-composite-type/src"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"strconv"
)

View File

@ -8,6 +8,7 @@ import (
"github.com/energye/energy/v2/cef/ipc/target"
ipcTypes "github.com/energye/energy/v2/cef/ipc/types"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
)
func main() {

View File

@ -9,6 +9,7 @@ import (
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/cef/ipc/context"
"github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"strings"
"time"

View File

@ -5,6 +5,7 @@ import (
"fmt"
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/ipc"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"time"
)
@ -38,7 +39,7 @@ func main() {
cef.Run(cefApp)
}
//定时执行web js
// 定时执行web js
func timeTask() {
//这里模拟go中触发js监听的事件
var param0 = 0

View File

@ -9,6 +9,7 @@ import (
"github.com/energye/energy/v2/cef/ipc/target"
demoCommon "github.com/energye/energy/v2/examples/common"
"github.com/energye/energy/v2/examples/common/tray"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/logger"
"github.com/energye/golcl/lcl"
"time"

View File

@ -6,6 +6,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/common"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
)

View File

@ -4,6 +4,7 @@ import (
"embed"
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"path"
)

View File

@ -4,6 +4,7 @@ import (
"embed"
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
)
//go:embed resources

View File

@ -4,7 +4,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
"github.com/energye/energy/v2/examples/many-browser/form"
_ "github.com/energye/energy/v2/examples/many-browser/syso"
_ "github.com/energye/energy/v2/examples/syso"
"path/filepath"
)

View File

@ -8,6 +8,7 @@ import (
"github.com/energye/energy/v2/cef/ipc/target"
"github.com/energye/energy/v2/cef/ipc/types"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
t "github.com/energye/energy/v2/types"
lcltypes "github.com/energye/golcl/lcl/types"
)

View File

@ -5,6 +5,7 @@ import (
"fmt"
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/ipc"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/types"

View File

@ -7,6 +7,7 @@ import (
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/cef/winapi"
"github.com/energye/energy/v2/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/logger"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/energy/v2/types"

View File

@ -7,6 +7,7 @@ import (
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/cef/ipc/context"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
"path"

View File

@ -4,6 +4,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/process"
"github.com/energye/energy/v2/common"
_ "github.com/energye/energy/v2/examples/syso"
)
func main() {

View File

@ -4,6 +4,7 @@ import (
"fmt"
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"strings"
)

View File

@ -6,6 +6,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
"io/ioutil"

View File

@ -5,6 +5,7 @@ import (
"fmt"
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"io/ioutil"
"path/filepath"

View File

@ -3,6 +3,7 @@ package main
import (
"fmt"
"github.com/energye/energy/v2/cef"
_ "github.com/energye/energy/v2/examples/syso"
)
func main() {

View File

@ -5,6 +5,7 @@ import (
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/consts"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/rtl"
"github.com/energye/golcl/lcl/types"
@ -17,9 +18,11 @@ func main() {
//Create an application
app := cef.NewApplication()
//Local load resources
cef.BrowserWindow.Config.LocalResource(cef.LocalLoadConfig{
ResRootDir: "resources",
FS: demoCommon.ResourcesFS(),
Home: "screenshot.html",
}.Build())
cef.BrowserWindow.Config.Width = 600
cef.BrowserWindow.Config.Height = 400

View File

@ -7,6 +7,7 @@ import (
"github.com/energye/energy/v2/cef/ipc/context"
"github.com/energye/energy/v2/common"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
)

View File

@ -7,6 +7,7 @@ import (
"github.com/energye/energy/v2/common"
"github.com/energye/energy/v2/consts"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/api"

View File

@ -5,6 +5,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/common"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/types"
"github.com/energye/golcl/lcl/win"

Binary file not shown.

Binary file not shown.

View File

@ -3,6 +3,7 @@ package main
import (
"embed"
"github.com/energye/energy/v2/cef"
_ "github.com/energye/energy/v2/examples/syso"
)
/*

View File

@ -5,6 +5,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/ipc"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/energy/v2/pkgs/channel"
"github.com/energye/golcl/lcl"

View File

@ -4,6 +4,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/examples/common"
"github.com/energye/energy/v2/examples/common/tray"
_ "github.com/energye/energy/v2/examples/syso"
)
func main() {

View File

@ -5,6 +5,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/ipc"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/energy/v2/pkgs/channel"
)
@ -13,8 +14,7 @@ func main() {
cef.GlobalInit(nil, demoCommon.ResourcesFS())
cefApp := cef.NewApplication()
// 强制切换到VF窗口组件, 需要同时设置以下两个配置项为 false
cefApp.SetExternalMessagePump(false)
cefApp.SetMultiThreadedMessageLoop(false)
cefApp.EnableVFWindow(true)
cef.BrowserWindow.Config.Url = "https://www.baidu.com"
cef.BrowserWindow.SetBrowserInit(func(event *cef.BrowserEvent, window cef.IBrowserWindow) {
if window.IsViewsFramework() {

View File

@ -4,6 +4,7 @@ import (
"fmt"
"github.com/energye/energy/v2/cef"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
)

View File

@ -17,6 +17,7 @@ import (
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/cef/ipc/callback"
"github.com/energye/energy/v2/cef/ipc/context"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/golcl/lcl/rtl/version"
"time"

View File

@ -14,6 +14,7 @@ import (
"fmt"
"github.com/energye/energy/v2/cef"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
)

View File

@ -12,6 +12,7 @@ package main
import (
"github.com/energye/energy/v2/cef"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/types"
"time"

View File

@ -12,6 +12,7 @@ package main
import (
"github.com/energye/energy/v2/cef"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/types"
"time"

View File

@ -14,6 +14,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"time"
)

View File

@ -17,6 +17,7 @@ import (
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/cef/ipc/callback"
"github.com/energye/energy/v2/consts"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
)

View File

@ -4,6 +4,7 @@ import (
"fmt"
"github.com/energye/energy/v2/cef"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/types"
)

View File

@ -8,6 +8,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/consts"
"github.com/energye/energy/v2/consts/messages"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/api"
"github.com/energye/golcl/lcl/rtl"

View File

@ -1,9 +1,11 @@
//go:build windows
// +build windows
package main
import (
"github.com/energye/energy/v2/cef"
_ "github.com/energye/energy/v2/examples/syso"
)
func main() {

View File

@ -1,4 +1,5 @@
//go:build windows
// +build windows
package main
@ -7,6 +8,7 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/winapi"
"github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
"github.com/energye/energy/v2/types"
"github.com/energye/golcl/lcl/types/colors"

View File

@ -3,6 +3,7 @@ package main
import (
"fmt"
"github.com/energye/energy/v2/cef"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
)

View File

@ -7,6 +7,7 @@ import (
"github.com/energye/energy/v2/cef/ipc/context"
"github.com/energye/energy/v2/consts"
demoCommon "github.com/energye/energy/v2/examples/common"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
)