Beispiel #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))
}
Beispiel #2
0
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
}