Exemple #1
0
// CreateWindowFrom (https://wiki.libsdl.org/SDL_CreateWindowFrom)
func CreateWindowFrom(data unsafe.Pointer) (*Window, error) {
	_window := C.SDL_CreateWindowFrom(data)
	if _window == nil {
		return nil, GetError()
	}
	return (*Window)(unsafe.Pointer(_window)), nil
}
Exemple #2
0
func CreateWindowFrom(data uintptr) (*Window, error) {
	win := C.SDL_CreateWindowFrom(unsafe.Pointer(data))
	if win == nil {
		return nil, getError()
	}

	return &Window{win}, nil
}
Exemple #3
0
func CreateWindowFrom(data unsafe.Pointer) *Window {
	return (*Window)(unsafe.Pointer(C.SDL_CreateWindowFrom(data)))
}