當前位置: 首頁>>代碼示例>>Golang>>正文


Golang C.SDL_WM_SetCaption函數代碼示例

本文整理匯總了Golang中C.SDL_WM_SetCaption函數的典型用法代碼示例。如果您正苦於以下問題:Golang SDL_WM_SetCaption函數的具體用法?Golang SDL_WM_SetCaption怎麽用?Golang SDL_WM_SetCaption使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了SDL_WM_SetCaption函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: WM_SetCaption

// Sets the window title and icon name.
func WM_SetCaption(title, icon string) {
	ctitle := C.CString(title)
	cicon := C.CString(icon)
	C.SDL_WM_SetCaption(ctitle, cicon)
	C.free(unsafe.Pointer(ctitle))
	C.free(unsafe.Pointer(cicon))
}
開發者ID:gnanderson,項目名稱:Go-SDL,代碼行數:8,代碼來源:sdl.go

示例2: WM_SetCaption

// Sets the window title and icon name.
func WM_SetCaption(title, icon string) {
	ctitle := C.CString(title)
	cicon := C.CString(icon)

	GlobalMutex.Lock()
	C.SDL_WM_SetCaption(ctitle, cicon)
	GlobalMutex.Unlock()

	C.free(unsafe.Pointer(ctitle))
	C.free(unsafe.Pointer(cicon))
}
開發者ID:kearsley,項目名稱:Go-SDL,代碼行數:12,代碼來源:sdl.go

示例3: NewDisplay

func NewDisplay(title string, width, height int) (*Display, error) {
	d := Display{frame: make(chan *C.AVFrame)}
	d.width = C.int(width)
	d.height = C.int(height)
	d.screen = C.SDL_SetVideoMode(d.width, d.height, 0, 0)
	d.overlay = C.SDL_CreateYUVOverlay(d.width, d.height, C.SDL_IYUV_OVERLAY, d.screen)
	t := C.CString(title)
	C.SDL_WM_SetCaption(t, (*C.char)(null))
	C.free(unsafe.Pointer(t))
	return &d, nil
}
開發者ID:qianbo0423,項目名稱:media-muxer,代碼行數:11,代碼來源:display.go

示例4: OpenDisplay

//Opens a window.
//Returns an indicator of success.
func OpenDisplay(width, height int, fullscreen bool) bool {
	if C.SDL_Init(C.SDL_INIT_VIDEO) != 0 {
		return false
	}
	C.TTF_Init()
	var flags C.Uint32 = C.SDL_DOUBLEBUF
	flags |= C.SDL_SWSURFACE
	flags |= C.SDL_HWACCEL

	if fullscreen {
		screen = C.openDisplayFullscreen(C.int(width), C.int(height))
	} else {
		screen = C.openDisplay(C.int(width), C.int(height))
	}
	if screen == nil {
		return false
	}
	C.SDL_WM_SetCaption(C.CString(displayTitle), C.CString(""))
	C.SDL_GL_SetAttribute(C.SDL_GL_SWAP_CONTROL, 1)

	return true
}
開發者ID:griffy,項目名稱:starfish,代碼行數:24,代碼來源:display.go

示例5: SetDisplayTitle

//Sets the title of the window.
func SetDisplayTitle(title string) {
	displayTitle = title
	if screen != nil {
		C.SDL_WM_SetCaption(C.CString(displayTitle), C.CString(""))
	}
}
開發者ID:griffy,項目名稱:starfish,代碼行數:7,代碼來源:display.go

示例6: WM_SetCaption

//
// Sets/Gets the title and icon text of the display window (UTF-8 encoded)
func WM_SetCaption(title, icon string) {
	ctitle := cstr(title)
	cicon := cstr(icon)
	C.SDL_WM_SetCaption(ctitle, cicon)
}
開發者ID:beoran,項目名稱:fungo,代碼行數:7,代碼來源:video.go


注:本文中的C.SDL_WM_SetCaption函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。