提交 d068ef38 编写于 作者: yanghye's avatar yanghye

A: demo Window IScreen

上级 5cebde59
......@@ -14,12 +14,12 @@ func main() {
cef.BrowserWindow.Config.Url = "https://energy.yanghy.cn"
cef.BrowserWindow.SetBrowserInit(func(event *cef.BrowserEvent, window cef.IBrowserWindow) {
screen := window.Screen()
fmt.Println("name:", screen.Name())
fmt.Println("default-monitor width:", screen.Width(), "height:", screen.Height())
fmt.Println("MonitorCount", screen.MonitorCount())
for i := 0; i < int(screen.MonitorCount()); i++ {
monitor := screen.Monitors(int32(i))
fmt.Println("\tmonitor", i, "workarea-rect:", monitor.WorkareaRect())
pr := screen.Primary()
fmt.Println("Primary:", pr)
fmt.Println("MonitorCount", screen.Count())
for i := 0; i < screen.Count(); i++ {
monitor := screen.Get(i)
fmt.Println("\tmonitor", i, "work-rect:", monitor)
}
})
//运行应用
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册