Example #1
0
func Fullscreen(fs bool) {
	if fs {
		C.SDL_SetWindowFullscreen(win, C.SDL_WINDOW_FULLSCREEN_DESKTOP)
	} else {
		C.SDL_SetWindowFullscreen(win, 0)
	}
}
Example #2
0
func (win *Window) SetFullscreen(flags WindowFlags) error {
	if C.SDL_SetWindowFullscreen(win.c, C.Uint32(flags)) != 0 {
		return getError()
	}

	return nil
}
Example #3
0
File: sdl.go Project: henkman/Go2D
func (window *Window) SetFullscreen(fullscreen bool) {
	var _fullscreen uint32
	if fullscreen {
		_fullscreen = 1
	}
	C.SDL_SetWindowFullscreen(window.window, C.Uint32(_fullscreen))
}
Example #4
0
func (win *Window) SetFullscreen(fs bool) error {
	cfs := C.SDL_bool(C.SDL_FALSE)
	if fs {
		cfs = C.SDL_TRUE
	}

	if C.SDL_SetWindowFullscreen(win.c, cfs) != 0 {
		return getError()
	}

	return nil
}
Example #5
0
func (w *Window) SetFullscreen(flags uint32) {
	C.SDL_SetWindowFullscreen(w.cWindow, C.Uint32(flags))
}
Example #6
0
func (window *Window) SetFullscreen(flags uint32) int {
	_window := (*C.SDL_Window)(unsafe.Pointer(window))
	_flags := (C.Uint32)(flags)
	return (int)(C.SDL_SetWindowFullscreen(_window, _flags))
}
Example #7
0
// Window (https://wiki.libsdl.org/SDL_SetWindowFullscreen)
func (window *Window) SetFullscreen(flags uint32) error {
	if C.SDL_SetWindowFullscreen(window.cptr(), C.Uint32(flags)) != 0 {
		return GetError()
	}
	return nil
}
Example #8
0
File: video.go Project: salihdb/sdl
// LeaveFullScreen leaves full screen mode for the window.
func (win *Window) LeaveFullScreen() (err error) {
	if C.SDL_SetWindowFullscreen(win.cWin, C.SDL_FALSE) != 0 {
		return getError()
	}
	return nil
}
Example #9
0
File: video.go Project: salihdb/sdl
// EnterFullScreen enters full screen mode for the window.
func (win *Window) EnterFullScreen() (err error) {
	if C.SDL_SetWindowFullscreen(win.cWin, C.SDL_TRUE) != 0 {
		return getError()
	}
	return nil
}
Example #10
0
File: sdl.go Project: rwcarlsen/sdl
func (w *Window) Windowed() { C.SDL_SetWindowFullscreen(w.win, 0) }
Example #11
0
File: sdl.go Project: rwcarlsen/sdl
func (w *Window) Fullscreen() { C.SDL_SetWindowFullscreen(w.win, C.SDL_WINDOW_FULLSCREEN) }
Example #12
0
func (w *Window) SetFullscreen(flags uint32) {
	GlobalMutex.Lock()
	defer GlobalMutex.Unlock()

	C.SDL_SetWindowFullscreen(w.cWindow, C.Uint32(flags))
}
Example #13
0
func (window *Window) SetFullscreen(flags uint32) int {
	return int(C.SDL_SetWindowFullscreen(window.cptr(), C.Uint32(flags)))
}