示例#1
0
func (osx *osxSystemObject) CreateWindow(x, y, width, height int) {
	globalLock.Lock()
	defer globalLock.Unlock()
	w := (*unsafe.Pointer)(unsafe.Pointer(&osx.window))
	c := (*unsafe.Pointer)(unsafe.Pointer(&osx.context))
	C.CreateWindow(w, c, C.int(x), C.int(y), C.int(width), C.int(height))
}
示例#2
0
文件: cocoa.go 项目: kayon/cef2go
func CreateWindow(title string, width int, height int) unsafe.Pointer {
	Logger.Println("CreateWindow")
	csTitle := C.CString(title)
	defer C.free(unsafe.Pointer(csTitle))
	window := C.CreateWindow(csTitle, C.int(width), C.int(height))
	return window
}