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

package sdl2

// #include "structs_accessor.h"
// #include "wrapper.h"
// #include "../../imgui/extra_types.h"
import "C"
import "github.com/AllenDang/cimgui-go/internal"

func ContentScaleForDisplay(display_index int32) float32 {
	return float32(C.ImGui_ImplSDL2_GetContentScaleForDisplay(C.int(display_index)))
}

func ContentScaleForWindow(window *SDLWindow) float32 {
	windowArg, windowFin := window.Handle()

	defer func() {
		windowFin()
	}()
	return float32(C.ImGui_ImplSDL2_GetContentScaleForWindow(internal.ReinterpretCast[*C.SDL_Window](windowArg)))
}

func InitForD3D(window *SDLWindow) bool {
	windowArg, windowFin := window.Handle()

	defer func() {
		windowFin()
	}()
	return C.ImGui_ImplSDL2_InitForD3D(internal.ReinterpretCast[*C.SDL_Window](windowArg)) == C.bool(true)
}

func InitForMetal(window *SDLWindow) bool {
	windowArg, windowFin := window.Handle()

	defer func() {
		windowFin()
	}()
	return C.ImGui_ImplSDL2_InitForMetal(internal.ReinterpretCast[*C.SDL_Window](windowArg)) == C.bool(true)
}

func InitForOpenGL(window *SDLWindow, sdl_gl_context uintptr) bool {
	windowArg, windowFin := window.Handle()

	defer func() {
		windowFin()
	}()
	return C.wrap_ImGui_ImplSDL2_InitForOpenGL(internal.ReinterpretCast[*C.SDL_Window](windowArg), C.uintptr_t(sdl_gl_context)) == C.bool(true)
}

func InitForOther(window *SDLWindow) bool {
	windowArg, windowFin := window.Handle()

	defer func() {
		windowFin()
	}()
	return C.ImGui_ImplSDL2_InitForOther(internal.ReinterpretCast[*C.SDL_Window](windowArg)) == C.bool(true)
}

func InitForSDLRenderer(window *SDLWindow, renderer *SDLRenderer) bool {
	windowArg, windowFin := window.Handle()
	rendererArg, rendererFin := renderer.Handle()

	defer func() {
		windowFin()
		rendererFin()
	}()
	return C.ImGui_ImplSDL2_InitForSDLRenderer(internal.ReinterpretCast[*C.SDL_Window](windowArg), internal.ReinterpretCast[*C.SDL_Renderer](rendererArg)) == C.bool(true)
}

func InitForVulkan(window *SDLWindow) bool {
	windowArg, windowFin := window.Handle()

	defer func() {
		windowFin()
	}()
	return C.ImGui_ImplSDL2_InitForVulkan(internal.ReinterpretCast[*C.SDL_Window](windowArg)) == C.bool(true)
}

func NewFrame() {
	C.ImGui_ImplSDL2_NewFrame()
}

func Shutdown() {
	C.ImGui_ImplSDL2_Shutdown()
}
