packages feed

dear-imgui-raw-imnodes-1.0.0: cbits/dcimnodes.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 "imnodes.h"

// Glue file consumed by dear_bindings at imnodes-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 dcimnodes.h default) to
// fully defined, which dcimnodes.cpp needs for its by-value
// argument/return shims.
#define DEAR_BINDINGS_INTERNAL_GLUE_CODE
namespace cimgui
{
#include "dcimgui.h"
#include "dcimnodes.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 void cimgui::ImNodesSetImGuiContext(cimgui::ImGuiContext* ctx)
{
    ::ImNodes::SetImGuiContext(reinterpret_cast<::ImGuiContext*>(ctx));
}

CIMGUI_API cimgui::ImNodesContext* cimgui::ImNodesCreateContext(void)
{
    return reinterpret_cast<::cimgui::ImNodesContext*>(::ImNodes::CreateContext());
}

CIMGUI_API void            cimgui::ImNodesDestroyContext(cimgui::ImNodesContext* ctx)
{
    ::ImNodes::DestroyContext(reinterpret_cast<::ImNodesContext*>(ctx));
}

CIMGUI_API cimgui::ImNodesContext* cimgui::ImNodesGetCurrentContext(void)
{
    return reinterpret_cast<::cimgui::ImNodesContext*>(::ImNodes::GetCurrentContext());
}

CIMGUI_API void            cimgui::ImNodesSetCurrentContext(cimgui::ImNodesContext* ctx)
{
    ::ImNodes::SetCurrentContext(reinterpret_cast<::ImNodesContext*>(ctx));
}

CIMGUI_API cimgui::ImNodesEditorContext* cimgui::ImNodesEditorContextCreate(void)
{
    return reinterpret_cast<::cimgui::ImNodesEditorContext*>(::ImNodes::EditorContextCreate());
}

CIMGUI_API void                  cimgui::ImNodesEditorContextFree(cimgui::ImNodesEditorContext* __unnamed_arg0__)
{
    ::ImNodes::EditorContextFree(reinterpret_cast<::ImNodesEditorContext*>(__unnamed_arg0__));
}

CIMGUI_API void                  cimgui::ImNodesEditorContextSet(cimgui::ImNodesEditorContext* __unnamed_arg0__)
{
    ::ImNodes::EditorContextSet(reinterpret_cast<::ImNodesEditorContext*>(__unnamed_arg0__));
}

CIMGUI_API cimgui::ImVec2        cimgui::ImNodesEditorContextGetPanning(void)
{
    return ConvertFromCPP_ImVec2(::ImNodes::EditorContextGetPanning());
}

CIMGUI_API void                  cimgui::ImNodesEditorContextResetPanning(cimgui::ImVec2 pos)
{
    ::ImNodes::EditorContextResetPanning(ConvertToCPP_ImVec2(pos));
}

CIMGUI_API void                  cimgui::ImNodesEditorContextMoveToNode(const int node_id)
{
    ::ImNodes::EditorContextMoveToNode(node_id);
}

CIMGUI_API cimgui::ImNodesIO* cimgui::ImNodesGetIO(void)
{
    return reinterpret_cast<::cimgui::ImNodesIO*>(&::ImNodes::GetIO());
}

CIMGUI_API cimgui::ImNodesStyle* cimgui::ImNodesGetStyle(void)
{
    return reinterpret_cast<::cimgui::ImNodesStyle*>(&::ImNodes::GetStyle());
}

CIMGUI_API void          cimgui::ImNodesStyleColorsDark(cimgui::ImNodesStyle* dest)
{
    ::ImNodes::StyleColorsDark(reinterpret_cast<::ImNodesStyle*>(dest));
}

CIMGUI_API void          cimgui::ImNodesStyleColorsClassic(cimgui::ImNodesStyle* dest)
{
    ::ImNodes::StyleColorsClassic(reinterpret_cast<::ImNodesStyle*>(dest));
}

CIMGUI_API void          cimgui::ImNodesStyleColorsLight(cimgui::ImNodesStyle* dest)
{
    ::ImNodes::StyleColorsLight(reinterpret_cast<::ImNodesStyle*>(dest));
}

CIMGUI_API const char*   cimgui::ImNodesGetStyleColorName(ImNodesCol idx)
{
    return ::ImNodes::GetStyleColorName(idx);
}

CIMGUI_API void cimgui::ImNodesBeginNodeEditor(void)
{
    ::ImNodes::BeginNodeEditor();
}

CIMGUI_API void cimgui::ImNodesEndNodeEditor(void)
{
    ::ImNodes::EndNodeEditor();
}

CIMGUI_API void cimgui::ImNodesMiniMap(const float minimap_size_fraction, const ImNodesMiniMapLocation location, const cimgui::ImNodesMiniMapNodeHoveringCallback node_hovering_callback, const ImNodesMiniMapNodeHoveringCallbackUserData node_hovering_callback_data)
{
    ::ImNodes::MiniMap(minimap_size_fraction, location, reinterpret_cast<const ::ImNodesMiniMapNodeHoveringCallback>(node_hovering_callback), node_hovering_callback_data);
}

CIMGUI_API void cimgui::ImNodesPushColorStyle(ImNodesCol item, unsigned int color)
{
    ::ImNodes::PushColorStyle(item, color);
}

CIMGUI_API void cimgui::ImNodesPopColorStyle(void)
{
    ::ImNodes::PopColorStyle();
}

CIMGUI_API void cimgui::ImNodesPushStyleVar(ImNodesStyleVar style_item, float value)
{
    ::ImNodes::PushStyleVar(style_item, value);
}

CIMGUI_API void cimgui::ImNodesPushStyleVarImVec2(ImNodesStyleVar style_item, cimgui::ImVec2 value)
{
    ::ImNodes::PushStyleVar(style_item, ConvertToCPP_ImVec2(value));
}

CIMGUI_API void cimgui::ImNodesPopStyleVar(int count)
{
    ::ImNodes::PopStyleVar(count);
}

CIMGUI_API void cimgui::ImNodesBeginNode(int id)
{
    ::ImNodes::BeginNode(id);
}

CIMGUI_API void cimgui::ImNodesEndNode(void)
{
    ::ImNodes::EndNode();
}

CIMGUI_API cimgui::ImVec2 cimgui::ImNodesGetNodeDimensions(int id)
{
    return ConvertFromCPP_ImVec2(::ImNodes::GetNodeDimensions(id));
}

CIMGUI_API void cimgui::ImNodesBeginNodeTitleBar(void)
{
    ::ImNodes::BeginNodeTitleBar();
}

CIMGUI_API void cimgui::ImNodesEndNodeTitleBar(void)
{
    ::ImNodes::EndNodeTitleBar();
}

CIMGUI_API void cimgui::ImNodesBeginInputAttribute(int id, ImNodesPinShape shape)
{
    ::ImNodes::BeginInputAttribute(id, shape);
}

CIMGUI_API void cimgui::ImNodesEndInputAttribute(void)
{
    ::ImNodes::EndInputAttribute();
}

CIMGUI_API void cimgui::ImNodesBeginOutputAttribute(int id, ImNodesPinShape shape)
{
    ::ImNodes::BeginOutputAttribute(id, shape);
}

CIMGUI_API void cimgui::ImNodesEndOutputAttribute(void)
{
    ::ImNodes::EndOutputAttribute();
}

CIMGUI_API void cimgui::ImNodesBeginStaticAttribute(int id)
{
    ::ImNodes::BeginStaticAttribute(id);
}

CIMGUI_API void cimgui::ImNodesEndStaticAttribute(void)
{
    ::ImNodes::EndStaticAttribute();
}

CIMGUI_API void cimgui::ImNodesPushAttributeFlag(ImNodesAttributeFlags flag)
{
    ::ImNodes::PushAttributeFlag(flag);
}

CIMGUI_API void cimgui::ImNodesPopAttributeFlag(void)
{
    ::ImNodes::PopAttributeFlag();
}

CIMGUI_API void cimgui::ImNodesLink(int id, int start_attribute_id, int end_attribute_id)
{
    ::ImNodes::Link(id, start_attribute_id, end_attribute_id);
}

CIMGUI_API void cimgui::ImNodesSetNodeDraggable(int node_id, const bool draggable)
{
    ::ImNodes::SetNodeDraggable(node_id, draggable);
}

CIMGUI_API void cimgui::ImNodesSetNodeScreenSpacePos(int node_id, cimgui::ImVec2 screen_space_pos)
{
    ::ImNodes::SetNodeScreenSpacePos(node_id, ConvertToCPP_ImVec2(screen_space_pos));
}

CIMGUI_API void cimgui::ImNodesSetNodeEditorSpacePos(int node_id, cimgui::ImVec2 editor_space_pos)
{
    ::ImNodes::SetNodeEditorSpacePos(node_id, ConvertToCPP_ImVec2(editor_space_pos));
}

CIMGUI_API void cimgui::ImNodesSetNodeGridSpacePos(int node_id, cimgui::ImVec2 grid_pos)
{
    ::ImNodes::SetNodeGridSpacePos(node_id, ConvertToCPP_ImVec2(grid_pos));
}

CIMGUI_API cimgui::ImVec2 cimgui::ImNodesGetNodeScreenSpacePos(const int node_id)
{
    return ConvertFromCPP_ImVec2(::ImNodes::GetNodeScreenSpacePos(node_id));
}

CIMGUI_API cimgui::ImVec2 cimgui::ImNodesGetNodeEditorSpacePos(const int node_id)
{
    return ConvertFromCPP_ImVec2(::ImNodes::GetNodeEditorSpacePos(node_id));
}

CIMGUI_API cimgui::ImVec2 cimgui::ImNodesGetNodeGridSpacePos(const int node_id)
{
    return ConvertFromCPP_ImVec2(::ImNodes::GetNodeGridSpacePos(node_id));
}

CIMGUI_API void cimgui::ImNodesSnapNodeToGrid(int node_id)
{
    ::ImNodes::SnapNodeToGrid(node_id);
}

CIMGUI_API bool cimgui::ImNodesIsEditorHovered(void)
{
    return ::ImNodes::IsEditorHovered();
}

CIMGUI_API bool cimgui::ImNodesIsNodeHovered(int* node_id)
{
    return ::ImNodes::IsNodeHovered(node_id);
}

CIMGUI_API bool cimgui::ImNodesIsLinkHovered(int* link_id)
{
    return ::ImNodes::IsLinkHovered(link_id);
}

CIMGUI_API bool cimgui::ImNodesIsPinHovered(int* attribute_id)
{
    return ::ImNodes::IsPinHovered(attribute_id);
}

CIMGUI_API int  cimgui::ImNodesNumSelectedNodes(void)
{
    return ::ImNodes::NumSelectedNodes();
}

CIMGUI_API int  cimgui::ImNodesNumSelectedLinks(void)
{
    return ::ImNodes::NumSelectedLinks();
}

CIMGUI_API void cimgui::ImNodesGetSelectedNodes(int* node_ids)
{
    ::ImNodes::GetSelectedNodes(node_ids);
}

CIMGUI_API void cimgui::ImNodesGetSelectedLinks(int* link_ids)
{
    ::ImNodes::GetSelectedLinks(link_ids);
}

CIMGUI_API void cimgui::ImNodesClearNodeSelection(void)
{
    ::ImNodes::ClearNodeSelection();
}

CIMGUI_API void cimgui::ImNodesClearLinkSelection(void)
{
    ::ImNodes::ClearLinkSelection();
}

CIMGUI_API void cimgui::ImNodesSelectNode(int node_id)
{
    ::ImNodes::SelectNode(node_id);
}

CIMGUI_API void cimgui::ImNodesClearNodeSelectionInt(int node_id)
{
    ::ImNodes::ClearNodeSelection(node_id);
}

CIMGUI_API bool cimgui::ImNodesIsNodeSelected(int node_id)
{
    return ::ImNodes::IsNodeSelected(node_id);
}

CIMGUI_API void cimgui::ImNodesSelectLink(int link_id)
{
    ::ImNodes::SelectLink(link_id);
}

CIMGUI_API void cimgui::ImNodesClearLinkSelectionInt(int link_id)
{
    ::ImNodes::ClearLinkSelection(link_id);
}

CIMGUI_API bool cimgui::ImNodesIsLinkSelected(int link_id)
{
    return ::ImNodes::IsLinkSelected(link_id);
}

CIMGUI_API bool cimgui::ImNodesIsAttributeActive(void)
{
    return ::ImNodes::IsAttributeActive();
}

CIMGUI_API bool cimgui::ImNodesIsAnyAttributeActive(int* attribute_id)
{
    return ::ImNodes::IsAnyAttributeActive(attribute_id);
}

CIMGUI_API bool cimgui::ImNodesIsLinkStarted(int* started_at_attribute_id)
{
    return ::ImNodes::IsLinkStarted(started_at_attribute_id);
}

CIMGUI_API bool cimgui::ImNodesIsLinkDropped(int* started_at_attribute_id, bool including_detached_links)
{
    return ::ImNodes::IsLinkDropped(started_at_attribute_id, including_detached_links);
}

CIMGUI_API bool cimgui::ImNodesIsLinkCreated(int* started_at_attribute_id, int* ended_at_attribute_id, bool* created_from_snap)
{
    return ::ImNodes::IsLinkCreated(started_at_attribute_id, ended_at_attribute_id, created_from_snap);
}

CIMGUI_API bool cimgui::ImNodesIsLinkCreatedIntPtr(int* started_at_node_id, int* started_at_attribute_id, int* ended_at_node_id, int* ended_at_attribute_id, bool* created_from_snap)
{
    return ::ImNodes::IsLinkCreated(started_at_node_id, started_at_attribute_id, ended_at_node_id, ended_at_attribute_id, created_from_snap);
}

CIMGUI_API bool cimgui::ImNodesIsLinkDestroyed(int* link_id)
{
    return ::ImNodes::IsLinkDestroyed(link_id);
}

CIMGUI_API const char* cimgui::ImNodesSaveCurrentEditorStateToIniString(size_t* data_size)
{
    return ::ImNodes::SaveCurrentEditorStateToIniString(data_size);
}

CIMGUI_API const char* cimgui::ImNodesSaveEditorStateToIniString(const cimgui::ImNodesEditorContext* editor, size_t* data_size)
{
    return ::ImNodes::SaveEditorStateToIniString(reinterpret_cast<const ::ImNodesEditorContext*>(editor), data_size);
}

CIMGUI_API void cimgui::ImNodesLoadCurrentEditorStateFromIniString(const char* data, size_t data_size)
{
    ::ImNodes::LoadCurrentEditorStateFromIniString(data, data_size);
}

CIMGUI_API void cimgui::ImNodesLoadEditorStateFromIniString(cimgui::ImNodesEditorContext* editor, const char* data, size_t data_size)
{
    ::ImNodes::LoadEditorStateFromIniString(reinterpret_cast<::ImNodesEditorContext*>(editor), data, data_size);
}

CIMGUI_API void cimgui::ImNodesSaveCurrentEditorStateToIniFile(const char* file_name)
{
    ::ImNodes::SaveCurrentEditorStateToIniFile(file_name);
}

CIMGUI_API void cimgui::ImNodesSaveEditorStateToIniFile(const cimgui::ImNodesEditorContext* editor, const char* file_name)
{
    ::ImNodes::SaveEditorStateToIniFile(reinterpret_cast<const ::ImNodesEditorContext*>(editor), file_name);
}

CIMGUI_API void cimgui::ImNodesLoadCurrentEditorStateFromIniFile(const char* file_name)
{
    ::ImNodes::LoadCurrentEditorStateFromIniFile(file_name);
}

CIMGUI_API void cimgui::ImNodesLoadEditorStateFromIniFile(cimgui::ImNodesEditorContext* editor, const char* file_name)
{
    ::ImNodes::LoadEditorStateFromIniFile(reinterpret_cast<::ImNodesEditorContext*>(editor), file_name);
}