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

package implot

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

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

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

// NewEmptyFormatterTimeData creates FormatterTimeData with its 0 value.
func NewEmptyFormatterTimeData() *FormatterTimeData {
	return &FormatterTimeData{CData: new(C.Formatter_Time_Data)}
}

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

type AlignmentData struct {
	CData *C.ImPlotAlignmentData
}

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

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

// NewEmptyAlignmentData creates AlignmentData with its 0 value.
func NewEmptyAlignmentData() *AlignmentData {
	return &AlignmentData{CData: new(C.ImPlotAlignmentData)}
}

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

type Annotation struct {
	CData *C.ImPlotAnnotation
}

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

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

// NewEmptyAnnotation creates Annotation with its 0 value.
func NewEmptyAnnotation() *Annotation {
	return &Annotation{CData: new(C.ImPlotAnnotation)}
}

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

type AnnotationCollection struct {
	CData *C.ImPlotAnnotationCollection
}

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

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

// NewEmptyAnnotationCollection creates AnnotationCollection with its 0 value.
func NewEmptyAnnotationCollection() *AnnotationCollection {
	return &AnnotationCollection{CData: new(C.ImPlotAnnotationCollection)}
}

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

type Axis struct {
	CData *C.ImPlotAxis
}

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

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

// NewEmptyAxis creates Axis with its 0 value.
func NewEmptyAxis() *Axis {
	return &Axis{CData: new(C.ImPlotAxis)}
}

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

type AxisColor struct {
	CData *C.ImPlotAxisColor
}

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

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

type ColormapData struct {
	CData *C.ImPlotColormapData
}

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

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

// NewEmptyColormapData creates ColormapData with its 0 value.
func NewEmptyColormapData() *ColormapData {
	return &ColormapData{CData: new(C.ImPlotColormapData)}
}

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

type Context struct {
	CData *C.ImPlotContext
}

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

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

// NewEmptyContext creates Context with its 0 value.
func NewEmptyContext() *Context {
	return &Context{CData: new(C.ImPlotContext)}
}

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

type DateTimeSpec struct {
	CData *C.ImPlotDateTimeSpec
}

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

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

// NewEmptyDateTimeSpec creates DateTimeSpec with its 0 value.
func NewEmptyDateTimeSpec() *DateTimeSpec {
	return &DateTimeSpec{CData: new(C.ImPlotDateTimeSpec)}
}

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

type InputMap struct {
	CData *C.ImPlotInputMap
}

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

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

// NewEmptyInputMap creates InputMap with its 0 value.
func NewEmptyInputMap() *InputMap {
	return &InputMap{CData: new(C.ImPlotInputMap)}
}

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

type Item struct {
	CData *C.ImPlotItem
}

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

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

// NewEmptyItem creates Item with its 0 value.
func NewEmptyItem() *Item {
	return &Item{CData: new(C.ImPlotItem)}
}

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

type ItemGroup struct {
	CData *C.ImPlotItemGroup
}

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

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

// NewEmptyItemGroup creates ItemGroup with its 0 value.
func NewEmptyItemGroup() *ItemGroup {
	return &ItemGroup{CData: new(C.ImPlotItemGroup)}
}

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

type Legend struct {
	CData *C.ImPlotLegend
}

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

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

// NewEmptyLegend creates Legend with its 0 value.
func NewEmptyLegend() *Legend {
	return &Legend{CData: new(C.ImPlotLegend)}
}

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

type NextItemData struct {
	CData *C.ImPlotNextItemData
}

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

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

// NewEmptyNextItemData creates NextItemData with its 0 value.
func NewEmptyNextItemData() *NextItemData {
	return &NextItemData{CData: new(C.ImPlotNextItemData)}
}

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

type NextPlotData struct {
	CData *C.ImPlotNextPlotData
}

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

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

// NewEmptyNextPlotData creates NextPlotData with its 0 value.
func NewEmptyNextPlotData() *NextPlotData {
	return &NextPlotData{CData: new(C.ImPlotNextPlotData)}
}

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

type Plot struct {
	CData *C.ImPlotPlot
}

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

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

// NewEmptyPlot creates Plot with its 0 value.
func NewEmptyPlot() *Plot {
	return &Plot{CData: new(C.ImPlotPlot)}
}

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

type PointError struct {
	CData *C.ImPlotPointError
}

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

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

// NewEmptyPointError creates PointError with its 0 value.
func NewEmptyPointError() *PointError {
	return &PointError{CData: new(C.ImPlotPointError)}
}

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

type Range struct {
	CData *C.ImPlotRange
}

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

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

// NewEmptyRange creates Range with its 0 value.
func NewEmptyRange() *Range {
	return &Range{CData: new(C.ImPlotRange)}
}

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

type Rect struct {
	CData *C.ImPlotRect
}

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

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

// NewEmptyRect creates Rect with its 0 value.
func NewEmptyRect() *Rect {
	return &Rect{CData: new(C.ImPlotRect)}
}

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

type Style struct {
	CData *C.ImPlotStyle
}

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

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

// NewEmptyStyle creates Style with its 0 value.
func NewEmptyStyle() *Style {
	return &Style{CData: new(C.ImPlotStyle)}
}

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

type Subplot struct {
	CData *C.ImPlotSubplot
}

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

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

// NewEmptySubplot creates Subplot with its 0 value.
func NewEmptySubplot() *Subplot {
	return &Subplot{CData: new(C.ImPlotSubplot)}
}

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

type Tag struct {
	CData *C.ImPlotTag
}

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

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

// NewEmptyTag creates Tag with its 0 value.
func NewEmptyTag() *Tag {
	return &Tag{CData: new(C.ImPlotTag)}
}

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

type TagCollection struct {
	CData *C.ImPlotTagCollection
}

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

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

// NewEmptyTagCollection creates TagCollection with its 0 value.
func NewEmptyTagCollection() *TagCollection {
	return &TagCollection{CData: new(C.ImPlotTagCollection)}
}

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

type Tick struct {
	CData *C.ImPlotTick
}

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

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

// NewEmptyTick creates Tick with its 0 value.
func NewEmptyTick() *Tick {
	return &Tick{CData: new(C.ImPlotTick)}
}

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

type Ticker struct {
	CData *C.ImPlotTicker
}

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

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

// NewEmptyTicker creates Ticker with its 0 value.
func NewEmptyTicker() *Ticker {
	return &Ticker{CData: new(C.ImPlotTicker)}
}

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