示例#1
0
文件: handler.go 项目: CodyGuo/ngui
// 为窗口设置标题
func win_handler_setTitle(browser *cef.Browser, args []cef.V8Value) (result interface{}) {
	title := cef.V8ValueToString(args[0])

	h := win.HWND(browser.GetWindowHandle())
	win.SetWindowText(h, title)

	return
}
示例#2
0
文件: handler.go 项目: CodyGuo/ngui
// 创建窗口
func win_handler_create_window(browser *cef.Browser, args []cef.V8Value) (result interface{}) {
	fmt.Println("win_handler_create_window")

	url := cef.V8ValueToString(args[0])
	captionless := cef.V8ValueToBool(args[1])
	gApplication.CreateBrowserWindow(url, captionless)

	return
}