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

package ImGuiColorTextEdit

// #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 TextEditor struct {
	CData *C.TextEditor
}

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

// C is like Handle but returns plain type instead of pointer.
func (self TextEditor) C() (C.TextEditor, func()) {
	result, fn := self.Handle()
	return *result, fn
}

// NewEmptyTextEditor creates TextEditor with its 0 value.
func NewEmptyTextEditor() *TextEditor {
	return &TextEditor{CData: new(C.TextEditor)}
}

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