Пример #1
0
// Window (https://wiki.libsdl.org/SDL_GetWindowDisplayIndex)
func (window *Window) GetDisplayIndex() (int, error) {
	i := int(C.SDL_GetWindowDisplayIndex(window.cptr()))
	if i < 0 {
		return i, GetError()
	}
	return i, nil
}
Пример #2
0
func (win *Window) GetDisplayIndex() (int, error) {
	if d := C.SDL_GetWindowDisplayIndex(win.c); d >= 0 {
		return int(d), nil
	}

	return 0, getError()
}
Пример #3
0
func (window *Window) GetDisplayIndex() int {
	_window := (*C.SDL_Window)(unsafe.Pointer(window))
	return (int)(C.SDL_GetWindowDisplayIndex(_window))
}
Пример #4
0
func (window *Window) GetDisplayIndex() int {
	return int(C.SDL_GetWindowDisplayIndex(window.cptr()))
}