// Code generated by cmd/codegen from https://github.com/AllenDang/cimgui-go.
// DO NOT EDIT.

package sdl2

// #include <stdlib.h>
// #include <memory.h>
// #include "wrapper.h"
// #include "typedefs.h"
// #include "../../imgui/extra_types.h"
import "C"
import "github.com/AllenDang/cimgui-go/internal"

type SDLRenderer struct {
	CData *C.SDL_Renderer
}

// Handle returns C version of SDLRenderer and its finalizer func.
func (self *SDLRenderer) Handle() (result *C.SDL_Renderer, fin func()) {
	return self.CData, func() {}
}

// NewSDLRendererFromC creates SDLRenderer from its C pointer.
// SRC ~= *C.SDL_Renderer
func NewSDLRendererFromC[SRC any](cvalue SRC) *SDLRenderer {
	return &SDLRenderer{CData: internal.ReinterpretCast[*C.SDL_Renderer](cvalue)}
}

type SDLWindow struct {
	CData *C.SDL_Window
}

// Handle returns C version of SDLWindow and its finalizer func.
func (self *SDLWindow) Handle() (result *C.SDL_Window, fin func()) {
	return self.CData, func() {}
}

// NewSDLWindowFromC creates SDLWindow from its C pointer.
// SRC ~= *C.SDL_Window
func NewSDLWindowFromC[SRC any](cvalue SRC) *SDLWindow {
	return &SDLWindow{CData: internal.ReinterpretCast[*C.SDL_Window](cvalue)}
}
