// THIS FILE HAS BEEN AUTO-GENERATED BY THE 'DEAR BINDINGS' GENERATOR.
// **DO NOT EDIT DIRECTLY**
// https://github.com/dearimgui/dear_bindings

#include "imgui.h"
#include "imgui_impl_wgpu.h"

#include <stdio.h>

// Wrap this in a namespace to keep it separate from the C++ API
// This define prevents #defines in the header getting defined again (as they are already in the normal header above),
// and thus generating redefinition warnings
#define DEAR_BINDINGS_INTERNAL_GLUE_CODE
namespace cimgui
{
#include "dcimgui_impl_wgpu.h"
}
#undef DEAR_BINDINGS_INTERNAL_GLUE_CODE

// By-value struct conversions

static inline cimgui::ImVec2 ConvertFromCPP_ImVec2(const ::ImVec2& src)
{
    cimgui::ImVec2 dest;
    dest.x = src.x;
    dest.y = src.y;
    return dest;
}

static inline ::ImVec2 ConvertToCPP_ImVec2(const cimgui::ImVec2& src)
{
    ::ImVec2 dest;
    dest.x = src.x;
    dest.y = src.y;
    return dest;
}

static inline cimgui::ImVec4 ConvertFromCPP_ImVec4(const ::ImVec4& src)
{
    cimgui::ImVec4 dest;
    dest.x = src.x;
    dest.y = src.y;
    dest.z = src.z;
    dest.w = src.w;
    return dest;
}

static inline ::ImVec4 ConvertToCPP_ImVec4(const cimgui::ImVec4& src)
{
    ::ImVec4 dest;
    dest.x = src.x;
    dest.y = src.y;
    dest.z = src.z;
    dest.w = src.w;
    return dest;
}

static inline cimgui::ImTextureRef ConvertFromCPP_ImTextureRef(const ::ImTextureRef& src)
{
    cimgui::ImTextureRef dest;
    dest._TexData = reinterpret_cast<cimgui::ImTextureData*>(src._TexData);
    dest._TexID = src._TexID;
    return dest;
}

static inline ::ImTextureRef ConvertToCPP_ImTextureRef(const cimgui::ImTextureRef& src)
{
    ::ImTextureRef dest;
    dest._TexData = reinterpret_cast<::ImTextureData*>(src._TexData);
    dest._TexID = src._TexID;
    return dest;
}

static inline cimgui::ImColor ConvertFromCPP_ImColor(const ::ImColor& src)
{
    cimgui::ImColor dest;
    dest.Value.x = src.Value.x;
    dest.Value.y = src.Value.y;
    dest.Value.z = src.Value.z;
    dest.Value.w = src.Value.w;
    return dest;
}

static inline ::ImColor ConvertToCPP_ImColor(const cimgui::ImColor& src)
{
    ::ImColor dest;
    dest.Value.x = src.Value.x;
    dest.Value.y = src.Value.y;
    dest.Value.z = src.Value.z;
    dest.Value.w = src.Value.w;
    return dest;
}

// Function stubs

#ifndef IMGUI_DISABLE

CIMGUI_IMPL_API bool cimgui::cImGui_ImplWGPU_Init(cimgui::ImGui_ImplWGPU_InitInfo* init_info)
{
    return ::ImGui_ImplWGPU_Init(reinterpret_cast<::ImGui_ImplWGPU_InitInfo*>(init_info));
}

CIMGUI_IMPL_API void cimgui::cImGui_ImplWGPU_Shutdown(void)
{
    ::ImGui_ImplWGPU_Shutdown();
}

CIMGUI_IMPL_API void cimgui::cImGui_ImplWGPU_NewFrame(void)
{
    ::ImGui_ImplWGPU_NewFrame();
}

CIMGUI_IMPL_API void cimgui::cImGui_ImplWGPU_RenderDrawData(cimgui::ImDrawData* draw_data, WGPURenderPassEncoder pass_encoder)
{
    ::ImGui_ImplWGPU_RenderDrawData(reinterpret_cast<::ImDrawData*>(draw_data), pass_encoder);
}

CIMGUI_IMPL_API bool cimgui::cImGui_ImplWGPU_CreateDeviceObjects(void)
{
    return ::ImGui_ImplWGPU_CreateDeviceObjects();
}

CIMGUI_IMPL_API void cimgui::cImGui_ImplWGPU_InvalidateDeviceObjects(void)
{
    ::ImGui_ImplWGPU_InvalidateDeviceObjects();
}

CIMGUI_IMPL_API void cimgui::cImGui_ImplWGPU_UpdateTexture(cimgui::ImTextureData* tex)
{
    ::ImGui_ImplWGPU_UpdateTexture(reinterpret_cast<::ImTextureData*>(tex));
}

CIMGUI_IMPL_API bool cimgui::cImGui_ImplWGPU_IsSurfaceStatusError(WGPUSurfaceGetCurrentTextureStatus status)
{
    return ::ImGui_ImplWGPU_IsSurfaceStatusError(status);
}

CIMGUI_IMPL_API bool cimgui::cImGui_ImplWGPU_IsSurfaceStatusSubOptimal(WGPUSurfaceGetCurrentTextureStatus status)
{
    return ::ImGui_ImplWGPU_IsSurfaceStatusSubOptimal(status);
}

CIMGUI_IMPL_API void   cimgui::cImGui_ImplWGPU_DebugPrintAdapterInfo(WGPUAdapter adapter)
{
    ::ImGui_ImplWGPU_DebugPrintAdapterInfo(reinterpret_cast<const ::WGPUAdapter&>(adapter));
}

CIMGUI_IMPL_API const char* cimgui::cImGui_ImplWGPU_GetBackendTypeName(WGPUBackendType type)
{
    return ::ImGui_ImplWGPU_GetBackendTypeName(type);
}

CIMGUI_IMPL_API const char* cimgui::cImGui_ImplWGPU_GetAdapterTypeName(WGPUAdapterType type)
{
    return ::ImGui_ImplWGPU_GetAdapterTypeName(type);
}

#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN)

CIMGUI_IMPL_API const char* cimgui::cImGui_ImplWGPU_GetDeviceLostReasonName(WGPUDeviceLostReason type)
{
    return ::ImGui_ImplWGPU_GetDeviceLostReasonName(type);
}

CIMGUI_IMPL_API const char* cimgui::cImGui_ImplWGPU_GetErrorTypeName(WGPUErrorType type)
{
    return ::ImGui_ImplWGPU_GetErrorTypeName(type);
}

#endif // #if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN)

#if !(defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN))
#if defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)

// CIMGUI_IMPL_API const char* cimgui::cImGui_ImplWGPU_GetLogLevelName(WGPULogLevel level)
// {
//     return ::ImGui_ImplWGPU_GetLogLevelName(level);
// }

#endif // #if defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
#endif // #if !(defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN))

#ifndef __EMSCRIPTEN__

CIMGUI_IMPL_API WGPUSurface cimgui::cImGui_ImplWGPU_CreateWGPUSurfaceHelper(cimgui::ImGui_ImplWGPU_CreateSurfaceInfo* info)
{
    return ::ImGui_ImplWGPU_CreateWGPUSurfaceHelper(reinterpret_cast<::ImGui_ImplWGPU_CreateSurfaceInfo*>(info));
}

#endif // #ifndef __EMSCRIPTEN__
#endif // #ifndef IMGUI_DISABLE
