packages feed

dear-imgui-raw-knobs-1.0.0: cbits/dcimgui_knobs.cpp

// 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-knobs.h"

// Glue file consumed by dear_bindings at imgui-knobs-binding generation
// time. The cimgui namespace wraps the C-shape header so the
// generator can emit type aliases without colliding with the C++
// API; pulling dcimgui.h into the same namespace promotes ImVec2
// and friends from forward-declared (the dcimgui_knobs.h default) to
// fully defined, which dcimgui_knobs.cpp needs for its by-value
// argument/return shims.
#define DEAR_BINDINGS_INTERNAL_GLUE_CODE
namespace cimgui
{
#include "dcimgui.h"
#include "dcimgui_knobs.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

CIMGUI_API bool cimgui::ImGuiKnobsKnob(const char* label, float* p_value, float v_min, float v_max, float speed, const char* format, ImGuiKnobVariant variant, float size, ImGuiKnobFlags flags, int steps, float angle_min, float angle_max)
{
    return ::ImGuiKnobs::Knob(label, p_value, v_min, v_max, speed, format, variant, size, flags, steps, angle_min, angle_max);
}

CIMGUI_API bool cimgui::ImGuiKnobsKnobInt(const char* label, int* p_value, int v_min, int v_max, float speed, const char* format, ImGuiKnobVariant variant, float size, ImGuiKnobFlags flags, int steps, float angle_min, float angle_max)
{
    return ::ImGuiKnobs::KnobInt(label, p_value, v_min, v_max, speed, format, variant, size, flags, steps, angle_min, angle_max);
}