Example #1
0
func (win *Window) GetGammaRamp() (r, g, b uint16, err error) {
	var cr, cg, cb C.Uint16
	if C.SDL_GetWindowGammaRamp(win.c, &cr, &cg, &cb) != 0 {
		return 0, 0, 0, getError()
	}

	return uint16(cr), uint16(cg), uint16(cb), nil
}
Example #2
0
func (window *Window) GetGammaRamp(red, green, blue *uint16) int {
	var _red, _green, _blue *C.Uint16
	_window := (*C.SDL_Window)(unsafe.Pointer(window))
	status := (int)(C.SDL_GetWindowGammaRamp(_window, _red, _green, _blue))
	*red = (uint16)(*_red)
	*green = (uint16)(*_green)
	*blue = (uint16)(*_blue)
	return status
}
Example #3
0
// Window (https://wiki.libsdl.org/SDL_GetWindowGammaRamp)
func (window *Window) GetGammaRamp() (red, green, blue *[256]uint16, err error) {
	if C.SDL_GetWindowGammaRamp(
		window.cptr(),
		(*C.Uint16)(unsafe.Pointer(red)),
		(*C.Uint16)(unsafe.Pointer(green)),
		(*C.Uint16)(unsafe.Pointer(blue))) != 0 {

		return red, green, blue, GetError()
	}
	return red, green, blue, nil
}
Example #4
0
func (window *Window) GetGammaRamp() (red, green, blue uint16, status int) {
	var _red, _green, _blue C.Uint16
	_window := (*C.SDL_Window)(unsafe.Pointer(window))
	_status := (int)(C.SDL_GetWindowGammaRamp(_window, &_red, &_green, &_blue))
	return uint16(_red), uint16(_green), uint16(_blue), _status
}
Example #5
0
func (window *Window) GetGammaRamp() (red, green, blue uint16, status int) {
	var _red, _green, _blue C.Uint16
	_status := int(C.SDL_GetWindowGammaRamp(window.cptr(), &_red, &_green, &_blue))
	return uint16(_red), uint16(_green), uint16(_blue), _status
}