Exemplo n.º 1
0
func TrapMouse(trap bool) {
	if trap {
		C.SDL_SetWindowGrab(win, C.SDL_TRUE)
	} else {
		C.SDL_SetWindowGrab(win, C.SDL_FALSE)
	}
}
Exemplo n.º 2
0
Arquivo: sdl.go Projeto: rwcarlsen/sdl
func (w *Window) SetGrab(grab bool) {
	if grab {
		C.SDL_SetWindowGrab(w.win, 1)
	} else {
		C.SDL_SetWindowGrab(w.win, 0)
	}
}
Exemplo n.º 3
0
func (win *Window) SetGrab(grab bool) {
	cgrab := C.SDL_bool(C.SDL_FALSE)
	if grab {
		cgrab = C.SDL_TRUE
	}

	C.SDL_SetWindowGrab(win.c, cgrab)
}
Exemplo n.º 4
0
func (w *Window) SetGrab(grabbed bool) {
	C.SDL_SetWindowGrab(w.cWindow, C.SDL_bool(bool2int(grabbed)))
}
Exemplo n.º 5
0
func (window *Window) SetGrab(grabbed bool) {
	_window := (*C.SDL_Window)(unsafe.Pointer(window))
	_grabbed := (C.SDL_bool)(Btoi(grabbed))
	C.SDL_SetWindowGrab(_window, _grabbed)
}
Exemplo n.º 6
0
// Window (https://wiki.libsdl.org/SDL_SetWindowGrab)
func (window *Window) SetGrab(grabbed bool) {
	C.SDL_SetWindowGrab(window.cptr(), C.SDL_bool((Btoi(grabbed))))
}
Exemplo n.º 7
0
Arquivo: video.go Projeto: salihdb/sdl
// ReleaseInputFocus releases input focus for the window.
func (win *Window) ReleaseInputFocus() {
	C.SDL_SetWindowGrab(win.cWin, C.SDL_FALSE)
}
Exemplo n.º 8
0
Arquivo: video.go Projeto: salihdb/sdl
// GrabInputFocus grabs input focus for the window.
func (win *Window) GrabInputFocus() {
	C.SDL_SetWindowGrab(win.cWin, C.SDL_TRUE)
}