예제 #1
0
파일: sdl.go 프로젝트: manveru/Go-SDL
// Gets the window title and icon name.
func WM_GetCaption() (title, icon string) {
	//SDL seems to free these strings.  TODO: Check to see if that's the case
	var ctitle, cicon *C.char
	C.SDL_WM_GetCaption(&ctitle, &cicon)
	title, icon = C.GoString(ctitle), C.GoString(cicon)
	return
}
예제 #2
0
파일: sdl.go 프로젝트: kearsley/Go-SDL
// Gets the window title and icon name.
func WM_GetCaption() (title, icon string) {
	GlobalMutex.Lock()

	// SDL seems to free these strings.  TODO: Check to see if that's the case
	var ctitle, cicon *C.char
	C.SDL_WM_GetCaption(&ctitle, &cicon)
	title = C.GoString(ctitle)
	icon = C.GoString(cicon)

	GlobalMutex.Unlock()

	return
}