mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-14 21:48:30 +01:00
rename cimgui_auto to cimgui and cimgui to cimgui_nopreprocess
This commit is contained in:
@@ -1977,6 +1977,226 @@ CIMGUI_API void ImFont_AddRemapChar(ImFont* self,ImWchar dst,ImWchar src,bool ov
|
||||
{
|
||||
return self->AddRemapChar(dst,src,overwrite_dst);
|
||||
}
|
||||
CIMGUI_API void igGetWindowPos_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetWindowPos();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetWindowPos_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetWindowPos();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetWindowSize_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetWindowSize();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetWindowSize_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetWindowSize();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetContentRegionMax_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetContentRegionMax();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetContentRegionMax_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetContentRegionMax();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetContentRegionAvail_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetContentRegionAvail();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetContentRegionAvail_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetContentRegionAvail();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetWindowContentRegionMin_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetWindowContentRegionMin();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetWindowContentRegionMin_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetWindowContentRegionMin();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetWindowContentRegionMax_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetWindowContentRegionMax();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetWindowContentRegionMax_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetWindowContentRegionMax();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetFontTexUvWhitePixel_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetFontTexUvWhitePixel();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetFontTexUvWhitePixel_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetFontTexUvWhitePixel();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetCursorPos_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetCursorPos();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetCursorPos_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetCursorPos();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetCursorStartPos_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetCursorStartPos();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetCursorStartPos_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetCursorStartPos();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetCursorScreenPos_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetCursorScreenPos();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetCursorScreenPos_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetCursorScreenPos();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetItemRectMin_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetItemRectMin();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetItemRectMin_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetItemRectMin();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetItemRectMax_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetItemRectMax();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetItemRectMax_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetItemRectMax();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetItemRectSize_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetItemRectSize();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetItemRectSize_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetItemRectSize();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igCalcTextSize_nonUDT(ImVec2 *pOut,const char* text,const char* text_end,bool hide_text_after_double_hash,float wrap_width)
|
||||
{
|
||||
*pOut = ImGui::CalcTextSize(text,text_end,hide_text_after_double_hash,wrap_width);
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igCalcTextSize_nonUDT2(const char* text,const char* text_end,bool hide_text_after_double_hash,float wrap_width)
|
||||
{
|
||||
ImVec2 ret = ImGui::CalcTextSize(text,text_end,hide_text_after_double_hash,wrap_width);
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igColorConvertU32ToFloat4_nonUDT(ImVec4 *pOut,ImU32 in)
|
||||
{
|
||||
*pOut = ImGui::ColorConvertU32ToFloat4(in);
|
||||
}
|
||||
CIMGUI_API ImVec4_Simple igColorConvertU32ToFloat4_nonUDT2(ImU32 in)
|
||||
{
|
||||
ImVec4 ret = ImGui::ColorConvertU32ToFloat4(in);
|
||||
ImVec4_Simple ret2 = ImVec4ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetMousePos_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetMousePos();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetMousePos_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetMousePos();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetMousePosOnOpeningCurrentPopup_nonUDT(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetMousePosOnOpeningCurrentPopup();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetMousePosOnOpeningCurrentPopup_nonUDT2()
|
||||
{
|
||||
ImVec2 ret = ImGui::GetMousePosOnOpeningCurrentPopup();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void igGetMouseDragDelta_nonUDT(ImVec2 *pOut,int button,float lock_threshold)
|
||||
{
|
||||
*pOut = ImGui::GetMouseDragDelta(button,lock_threshold);
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple igGetMouseDragDelta_nonUDT2(int button,float lock_threshold)
|
||||
{
|
||||
ImVec2 ret = ImGui::GetMouseDragDelta(button,lock_threshold);
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void ImColor_HSV_nonUDT(ImColor* self,ImColor *pOut,float h,float s,float v,float a)
|
||||
{
|
||||
*pOut = self->HSV(h,s,v,a);
|
||||
}
|
||||
CIMGUI_API ImColor_Simple ImColor_HSV_nonUDT2(ImColor* self,float h,float s,float v,float a)
|
||||
{
|
||||
ImColor ret = self->HSV(h,s,v,a);
|
||||
ImColor_Simple ret2 = ImColorToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void ImDrawList_GetClipRectMin_nonUDT(ImDrawList* self,ImVec2 *pOut)
|
||||
{
|
||||
*pOut = self->GetClipRectMin();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple ImDrawList_GetClipRectMin_nonUDT2(ImDrawList* self)
|
||||
{
|
||||
ImVec2 ret = self->GetClipRectMin();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void ImDrawList_GetClipRectMax_nonUDT(ImDrawList* self,ImVec2 *pOut)
|
||||
{
|
||||
*pOut = self->GetClipRectMax();
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple ImDrawList_GetClipRectMax_nonUDT2(ImDrawList* self)
|
||||
{
|
||||
ImVec2 ret = self->GetClipRectMax();
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
CIMGUI_API void ImFont_CalcTextSizeA_nonUDT(ImFont* self,ImVec2 *pOut,float size,float max_width,float wrap_width,const char* text_begin,const char* text_end,const char** remaining)
|
||||
{
|
||||
*pOut = self->CalcTextSizeA(size,max_width,wrap_width,text_begin,text_end,remaining);
|
||||
}
|
||||
CIMGUI_API ImVec2_Simple ImFont_CalcTextSizeA_nonUDT2(ImFont* self,float size,float max_width,float wrap_width,const char* text_begin,const char* text_end,const char** remaining)
|
||||
{
|
||||
ImVec2 ret = self->CalcTextSizeA(size,max_width,wrap_width,text_begin,text_end,remaining);
|
||||
ImVec2_Simple ret2 = ImVec2ToSimple(ret);
|
||||
return ret2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
:: this script must be executed in this directory
|
||||
:: all the output goes to generated folder
|
||||
:: .cpp and .h files:
|
||||
:: cimgui.h and cimgui.cpp generated without preprocess
|
||||
:: cimgui_auto.h and cimgui_auto.cpp with gcc preprocess
|
||||
:: cimgui_nopreprocess.h and cimgui_nopreprocess.cpp generated without preprocess
|
||||
:: cimgui.h and cimgui.cpp with gcc preprocess
|
||||
:: cimgui_impl.h with implementation function cdefs
|
||||
:: lua and json files:
|
||||
:: definitions.lua for function definitions
|
||||
@@ -17,8 +17,8 @@
|
||||
luajit.exe ./generator.lua glfw opengl3 opengl2 sdl
|
||||
|
||||
::copy cimgui.h and cimgui.cpp
|
||||
copy .\generated\cimgui_auto.h ..\cimgui_auto.h
|
||||
copy .\generated\cimgui_auto.cpp ..\cimgui_auto.cpp
|
||||
copy .\generated\cimgui.h ..\cimgui.h
|
||||
copy .\generated\cimgui.cpp ..\cimgui.cpp
|
||||
|
||||
::leave console open
|
||||
cmd /k
|
||||
|
@@ -1190,7 +1190,7 @@ local function cimgui_generation(postfix,STP,FP)
|
||||
hfile:close()
|
||||
local cstructsstr,typedefs_dict = gen_structs_and_enums(STP.lines)
|
||||
--for not gcc parsing
|
||||
if postfix == "" then
|
||||
if postfix == "_nopreprocess" then
|
||||
cstructsstr = "typedef unsigned short ImDrawIdx;\ntypedef void* ImTextureID;\n"..cstructsstr
|
||||
end
|
||||
hstrfile = hstrfile:gsub([[#include "imgui_structs%.h"]],cstructsstr)
|
||||
@@ -1229,7 +1229,7 @@ for line in filelines(pipe) do
|
||||
end
|
||||
pipe:close()
|
||||
FP:compute_overloads()
|
||||
cimgui_generation("",STP,FP)
|
||||
cimgui_generation("_nopreprocess",STP,FP)
|
||||
|
||||
--then gcc
|
||||
print"------------------generation with precompiler------------------------"
|
||||
@@ -1254,7 +1254,7 @@ pipe:close()
|
||||
local ovstr = pFP:compute_overloads()
|
||||
ADDnonUDT(pFP)
|
||||
save_data("./generated/overloads.txt",ovstr)
|
||||
typedefs_dict2 = cimgui_generation("_auto",pSTP,pFP)
|
||||
typedefs_dict2 = cimgui_generation("",pSTP,pFP)
|
||||
--check arg detection failure if no name in function declaration
|
||||
check_arg_detection(pFP.defsT,typedefs_dict2)
|
||||
end
|
||||
|
Reference in New Issue
Block a user