Compare commits

...

13 Commits

Author SHA1 Message Date
sonoro1234
d2ee8fc7dd improve functionD_re 2018-12-24 12:28:37 +01:00
sonoro1234
593867e320 generator2 files 2018-12-23 19:53:14 +01:00
sonoro1234
907c2fddce generator.lua take care of type and name separated by * without spaces 2018-12-21 11:59:35 +01:00
sonoro1234
67f3b097a5 pull imgui 1.66b 2018-12-03 16:46:17 +01:00
sonoro1234
fd0199809d json: TAB 2 spaces solves #82? 2018-12-03 10:02:33 +01:00
sonoro1234
d174a02a0f indented json files 2018-12-02 18:37:52 +01:00
sonoro1234
291922f72c alphabetical sorted json files 2018-12-02 11:15:17 +01:00
Victor Bombi
7d963113c9 Merge pull request #84 from dos1/static
cmake: add an option to build as a static library
2018-11-28 19:37:05 +01:00
Sebastian Krzyszkowiak
8cbdca3344 cmake: add an option to build as a static library
Useful when including cimgui as a subproject in another CMake project.
2018-11-28 18:19:52 +01:00
sonoro1234
204f2828bb add folder testbuildc 2018-11-27 12:09:03 +01:00
sonoro1234
2c10d47b9a remove static char EmptyString lines 2018-11-27 12:07:56 +01:00
sonoro1234
df00156746 output json files with newline 2018-11-26 17:54:36 +01:00
sonoro1234
553364f7d8 add cimgui.h include guards 2018-11-26 15:57:19 +01:00
25 changed files with 20300 additions and 406 deletions

View File

@@ -16,9 +16,15 @@ else(WIN32)
add_definitions("-DIMGUI_IMPL_API=extern \"C\" ")
endif(WIN32)
set(IMGUI_STATIC "no" CACHE STRING "Build as a static library")
#add library and link
add_library(cimgui SHARED ${IMGUI_SOURCES})
if (IMGUI_STATIC)
add_library(cimgui STATIC ${IMGUI_SOURCES})
else (IMGUI_STATIC)
add_library(cimgui SHARED ${IMGUI_SOURCES})
endif (IMGUI_STATIC)
target_link_libraries(cimgui ${IMGUI_LIBRARIES})
set_target_properties(cimgui PROPERTIES PREFIX "")
@@ -26,5 +32,5 @@ set_target_properties(cimgui PROPERTIES PREFIX "")
install(TARGETS cimgui
RUNTIME DESTINATION .
LIBRARY DESTINATION .
#ARCHIVE DESTINATION lib
ARCHIVE DESTINATION .
)

View File

@@ -11,7 +11,7 @@ History:
Initially cimgui was developed by Stephan Dilly as hand-written code but lately turned into an auto-generated version by sonoro1234 in order to keep up with imgui more easily (letting the user select the desired branch and commit)
Notes:
* currently this wrapper is based on version [1.66 of Dear ImGui]
* currently this wrapper is based on version [1.66b of Dear ImGui]
* overloaded function names try to be the most compatible with traditional cimgui names. So all naming is algorithmic except for those names that were in conflict with widely used cimgui names and were thus coded in a table (https://github.com/cimgui/cimgui/blob/master/generator/generator.lua#L58). Current overloaded function names can be found in (https://github.com/cimgui/cimgui/blob/master/generator/output/overloads.txt)
# compilation

View File

@@ -1,5 +1,6 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.66" from Dear ImGui https://github.com/ocornut/imgui
//based on imgui.h file version "1.66b" from Dear ImGui https://github.com/ocornut/imgui
#include "./imgui/imgui.h"
#include "cimgui.h"
@@ -77,6 +78,10 @@ CIMGUI_API void igShowDemoWindow(bool* p_open)
{
return ImGui::ShowDemoWindow(p_open);
}
CIMGUI_API void igShowAboutWindow(bool* p_open)
{
return ImGui::ShowAboutWindow(p_open);
}
CIMGUI_API void igShowMetricsWindow(bool* p_open)
{
return ImGui::ShowMetricsWindow(p_open);
@@ -1434,6 +1439,50 @@ CIMGUI_API void ImGuiIO_destroy(ImGuiIO* self)
{
IM_DELETE(self);
}
CIMGUI_API ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(void)
{
return IM_NEW(ImGuiInputTextCallbackData)();
}
CIMGUI_API void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self)
{
IM_DELETE(self);
}
CIMGUI_API void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self,int pos,int bytes_count)
{
return self->DeleteChars(pos,bytes_count);
}
CIMGUI_API void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self,int pos,const char* text,const char* text_end)
{
return self->InsertChars(pos,text,text_end);
}
CIMGUI_API bool ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self)
{
return self->HasSelection();
}
CIMGUI_API ImGuiPayload* ImGuiPayload_ImGuiPayload(void)
{
return IM_NEW(ImGuiPayload)();
}
CIMGUI_API void ImGuiPayload_destroy(ImGuiPayload* self)
{
IM_DELETE(self);
}
CIMGUI_API void ImGuiPayload_Clear(ImGuiPayload* self)
{
return self->Clear();
}
CIMGUI_API bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type)
{
return self->IsDataType(type);
}
CIMGUI_API bool ImGuiPayload_IsPreview(ImGuiPayload* self)
{
return self->IsPreview();
}
CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self)
{
return self->IsDelivery();
}
CIMGUI_API ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(void)
{
return IM_NEW(ImGuiOnceUponAFrame)();
@@ -1614,49 +1663,25 @@ CIMGUI_API void ImGuiStorage_BuildSortByKey(ImGuiStorage* self)
{
return self->BuildSortByKey();
}
CIMGUI_API ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(void)
CIMGUI_API ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count,float items_height)
{
return IM_NEW(ImGuiInputTextCallbackData)();
return IM_NEW(ImGuiListClipper)(items_count,items_height);
}
CIMGUI_API void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self)
CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self)
{
IM_DELETE(self);
}
CIMGUI_API void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self,int pos,int bytes_count)
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self)
{
return self->DeleteChars(pos,bytes_count);
return self->Step();
}
CIMGUI_API void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self,int pos,const char* text,const char* text_end)
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height)
{
return self->InsertChars(pos,text,text_end);
return self->Begin(items_count,items_height);
}
CIMGUI_API bool ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self)
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* self)
{
return self->HasSelection();
}
CIMGUI_API ImGuiPayload* ImGuiPayload_ImGuiPayload(void)
{
return IM_NEW(ImGuiPayload)();
}
CIMGUI_API void ImGuiPayload_destroy(ImGuiPayload* self)
{
IM_DELETE(self);
}
CIMGUI_API void ImGuiPayload_Clear(ImGuiPayload* self)
{
return self->Clear();
}
CIMGUI_API bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type)
{
return self->IsDataType(type);
}
CIMGUI_API bool ImGuiPayload_IsPreview(ImGuiPayload* self)
{
return self->IsPreview();
}
CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self)
{
return self->IsDelivery();
return self->End();
}
CIMGUI_API ImColor* ImColor_ImColor(void)
{
@@ -1690,26 +1715,6 @@ CIMGUI_API ImColor ImColor_HSV(ImColor* self,float h,float s,float v,float a)
{
return self->HSV(h,s,v,a);
}
CIMGUI_API ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count,float items_height)
{
return IM_NEW(ImGuiListClipper)(items_count,items_height);
}
CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self)
{
IM_DELETE(self);
}
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self)
{
return self->Step();
}
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height)
{
return self->Begin(items_count,items_height);
}
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* self)
{
return self->End();
}
CIMGUI_API ImDrawCmd* ImDrawCmd_ImDrawCmd(void)
{
return IM_NEW(ImDrawCmd)();

120
cimgui.h
View File

@@ -1,5 +1,7 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.66" from Dear ImGui https://github.com/ocornut/imgui
//based on imgui.h file version "1.66b" from Dear ImGui https://github.com/ocornut/imgui
#ifndef CIMGUI_INCLUDED
#define CIMGUI_INCLUDED
#include <stdio.h>
#include <stdint.h>
#if defined _WIN32 || defined __CYGWIN__
@@ -330,6 +332,7 @@ enum ImGuiNavInput_
};
enum ImGuiConfigFlags_
{
ImGuiConfigFlags_None = 0,
ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
ImGuiConfigFlags_NavEnableSetMousePos = 1 << 2,
@@ -341,6 +344,7 @@ enum ImGuiConfigFlags_
};
enum ImGuiBackendFlags_
{
ImGuiBackendFlags_None = 0,
ImGuiBackendFlags_HasGamepad = 1 << 0,
ImGuiBackendFlags_HasMouseCursors = 1 << 1,
ImGuiBackendFlags_HasSetMousePos = 1 << 2
@@ -525,6 +529,8 @@ struct ImGuiIO
bool ConfigMacOSXBehaviors;
bool ConfigInputTextCursorBlink;
bool ConfigResizeWindowsFromEdges;
const char* BackendPlatformName;
const char* BackendRendererName;
const char* (*GetClipboardTextFn)(void* user_data);
void (*SetClipboardTextFn)(void* user_data, const char* text);
void* ClipboardUserData;
@@ -572,43 +578,6 @@ struct ImGuiIO
float NavInputsDownDuration[ImGuiNavInput_COUNT];
float NavInputsDownDurationPrev[ImGuiNavInput_COUNT];
};
typedef struct ImVector{int Size;int Capacity;void* Data;} ImVector;
typedef struct ImVector_float {int Size;int Capacity;float* Data;} ImVector_float;
typedef struct ImVector_ImWchar {int Size;int Capacity;ImWchar* Data;} ImVector_ImWchar;
typedef struct ImVector_ImFontConfig {int Size;int Capacity;ImFontConfig* Data;} ImVector_ImFontConfig;
typedef struct ImVector_ImFontGlyph {int Size;int Capacity;ImFontGlyph* Data;} ImVector_ImFontGlyph;
typedef struct ImVector_unsigned_char {int Size;int Capacity;unsigned char* Data;} ImVector_unsigned_char;
typedef struct ImVector_Pair {int Size;int Capacity;Pair* Data;} ImVector_Pair;
typedef struct ImVector_CustomRect {int Size;int Capacity;CustomRect* Data;} ImVector_CustomRect;
typedef struct ImVector_ImDrawChannel {int Size;int Capacity;ImDrawChannel* Data;} ImVector_ImDrawChannel;
typedef struct ImVector_char {int Size;int Capacity;char* Data;} ImVector_char;
typedef struct ImVector_ImTextureID {int Size;int Capacity;ImTextureID* Data;} ImVector_ImTextureID;
typedef struct ImVector_ImDrawVert {int Size;int Capacity;ImDrawVert* Data;} ImVector_ImDrawVert;
typedef struct ImVector_ImDrawCmd {int Size;int Capacity;ImDrawCmd* Data;} ImVector_ImDrawCmd;
typedef struct ImVector_ImFontPtr {int Size;int Capacity;ImFont** Data;} ImVector_ImFontPtr;
typedef struct ImVector_TextRange {int Size;int Capacity;TextRange* Data;} ImVector_TextRange;
typedef struct ImVector_ImVec4 {int Size;int Capacity;ImVec4* Data;} ImVector_ImVec4;
typedef struct ImVector_ImDrawIdx {int Size;int Capacity;ImDrawIdx* Data;} ImVector_ImDrawIdx;
typedef struct ImVector_ImVec2 {int Size;int Capacity;ImVec2* Data;} ImVector_ImVec2;
struct ImGuiOnceUponAFrame
{
int RefFrame;
};
struct ImGuiTextFilter
{
char InputBuf[256];
ImVector_TextRange Filters;
int CountGrep;
};
struct ImGuiTextBuffer
{
ImVector_char Buf;
char EmptyString[1];
};
struct ImGuiStorage
{
ImVector_Pair Data;
};
struct ImGuiInputTextCallbackData
{
ImGuiInputTextFlags EventFlag;
@@ -642,9 +611,41 @@ struct ImGuiPayload
bool Preview;
bool Delivery;
};
struct ImColor
typedef struct ImVector{int Size;int Capacity;void* Data;} ImVector;
typedef struct ImVector_float {int Size;int Capacity;float* Data;} ImVector_float;
typedef struct ImVector_ImWchar {int Size;int Capacity;ImWchar* Data;} ImVector_ImWchar;
typedef struct ImVector_ImFontConfig {int Size;int Capacity;ImFontConfig* Data;} ImVector_ImFontConfig;
typedef struct ImVector_ImFontGlyph {int Size;int Capacity;ImFontGlyph* Data;} ImVector_ImFontGlyph;
typedef struct ImVector_unsigned_char {int Size;int Capacity;unsigned char* Data;} ImVector_unsigned_char;
typedef struct ImVector_Pair {int Size;int Capacity;Pair* Data;} ImVector_Pair;
typedef struct ImVector_CustomRect {int Size;int Capacity;CustomRect* Data;} ImVector_CustomRect;
typedef struct ImVector_ImDrawChannel {int Size;int Capacity;ImDrawChannel* Data;} ImVector_ImDrawChannel;
typedef struct ImVector_char {int Size;int Capacity;char* Data;} ImVector_char;
typedef struct ImVector_ImTextureID {int Size;int Capacity;ImTextureID* Data;} ImVector_ImTextureID;
typedef struct ImVector_ImDrawVert {int Size;int Capacity;ImDrawVert* Data;} ImVector_ImDrawVert;
typedef struct ImVector_ImDrawCmd {int Size;int Capacity;ImDrawCmd* Data;} ImVector_ImDrawCmd;
typedef struct ImVector_ImFontPtr {int Size;int Capacity;ImFont** Data;} ImVector_ImFontPtr;
typedef struct ImVector_TextRange {int Size;int Capacity;TextRange* Data;} ImVector_TextRange;
typedef struct ImVector_ImVec4 {int Size;int Capacity;ImVec4* Data;} ImVector_ImVec4;
typedef struct ImVector_ImDrawIdx {int Size;int Capacity;ImDrawIdx* Data;} ImVector_ImDrawIdx;
typedef struct ImVector_ImVec2 {int Size;int Capacity;ImVec2* Data;} ImVector_ImVec2;
struct ImGuiOnceUponAFrame
{
ImVec4 Value;
int RefFrame;
};
struct ImGuiTextFilter
{
char InputBuf[256];
ImVector_TextRange Filters;
int CountGrep;
};
struct ImGuiTextBuffer
{
ImVector_char Buf;
};
struct ImGuiStorage
{
ImVector_Pair Data;
};
struct ImGuiListClipper
{
@@ -652,6 +653,10 @@ struct ImGuiListClipper
float ItemsHeight;
int ItemsCount, StepNo, DisplayStart, DisplayEnd;
};
struct ImColor
{
ImVec4 Value;
};
typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd);
struct ImDrawCmd
{
@@ -686,6 +691,7 @@ enum ImDrawCornerFlags_
};
enum ImDrawListFlags_
{
ImDrawListFlags_None = 0,
ImDrawListFlags_AntiAliasedLines = 1 << 0,
ImDrawListFlags_AntiAliasedFill = 1 << 1
};
@@ -865,6 +871,7 @@ CIMGUI_API void igEndFrame(void);
CIMGUI_API void igRender(void);
CIMGUI_API ImDrawData* igGetDrawData(void);
CIMGUI_API void igShowDemoWindow(bool* p_open);
CIMGUI_API void igShowAboutWindow(bool* p_open);
CIMGUI_API void igShowMetricsWindow(bool* p_open);
CIMGUI_API void igShowStyleEditor(ImGuiStyle* ref);
CIMGUI_API bool igShowStyleSelector(const char* label);
@@ -1195,6 +1202,17 @@ CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self,const char* utf8_ch
CIMGUI_API void ImGuiIO_ClearInputCharacters(ImGuiIO* self);
CIMGUI_API ImGuiIO* ImGuiIO_ImGuiIO(void);
CIMGUI_API void ImGuiIO_destroy(ImGuiIO* self);
CIMGUI_API ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(void);
CIMGUI_API void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self);
CIMGUI_API void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self,int pos,int bytes_count);
CIMGUI_API void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self,int pos,const char* text,const char* text_end);
CIMGUI_API bool ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self);
CIMGUI_API ImGuiPayload* ImGuiPayload_ImGuiPayload(void);
CIMGUI_API void ImGuiPayload_destroy(ImGuiPayload* self);
CIMGUI_API void ImGuiPayload_Clear(ImGuiPayload* self);
CIMGUI_API bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type);
CIMGUI_API bool ImGuiPayload_IsPreview(ImGuiPayload* self);
CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self);
CIMGUI_API ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(void);
CIMGUI_API void ImGuiOnceUponAFrame_destroy(ImGuiOnceUponAFrame* self);
CIMGUI_API ImGuiTextFilter* ImGuiTextFilter_ImGuiTextFilter(const char* default_filter);
@@ -1240,17 +1258,11 @@ CIMGUI_API float* ImGuiStorage_GetFloatRef(ImGuiStorage* self,ImGuiID key,float
CIMGUI_API void** ImGuiStorage_GetVoidPtrRef(ImGuiStorage* self,ImGuiID key,void* default_val);
CIMGUI_API void ImGuiStorage_SetAllInt(ImGuiStorage* self,int val);
CIMGUI_API void ImGuiStorage_BuildSortByKey(ImGuiStorage* self);
CIMGUI_API ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(void);
CIMGUI_API void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self);
CIMGUI_API void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self,int pos,int bytes_count);
CIMGUI_API void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self,int pos,const char* text,const char* text_end);
CIMGUI_API bool ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self);
CIMGUI_API ImGuiPayload* ImGuiPayload_ImGuiPayload(void);
CIMGUI_API void ImGuiPayload_destroy(ImGuiPayload* self);
CIMGUI_API void ImGuiPayload_Clear(ImGuiPayload* self);
CIMGUI_API bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type);
CIMGUI_API bool ImGuiPayload_IsPreview(ImGuiPayload* self);
CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self);
CIMGUI_API ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count,float items_height);
CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self);
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self);
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height);
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* self);
CIMGUI_API ImColor* ImColor_ImColor(void);
CIMGUI_API void ImColor_destroy(ImColor* self);
CIMGUI_API ImColor* ImColor_ImColorInt(int r,int g,int b,int a);
@@ -1259,11 +1271,6 @@ CIMGUI_API ImColor* ImColor_ImColorFloat(float r,float g,float b,float a);
CIMGUI_API ImColor* ImColor_ImColorVec4(const ImVec4 col);
CIMGUI_API void ImColor_SetHSV(ImColor* self,float h,float s,float v,float a);
CIMGUI_API ImColor ImColor_HSV(ImColor* self,float h,float s,float v,float a);
CIMGUI_API ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count,float items_height);
CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self);
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self);
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height);
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* self);
CIMGUI_API ImDrawCmd* ImDrawCmd_ImDrawCmd(void);
CIMGUI_API void ImDrawCmd_destroy(ImDrawCmd* self);
CIMGUI_API ImDrawList* ImDrawList_ImDrawList(const ImDrawListSharedData* shared_data);
@@ -1444,6 +1451,7 @@ CIMGUI_API ImVector_ImWchar* ImVector_ImWchar_create();
CIMGUI_API void ImVector_ImWchar_destroy(ImVector_ImWchar* p);
CIMGUI_API void ImVector_ImWchar_Init(ImVector_ImWchar* p);
CIMGUI_API void ImVector_ImWchar_UnInit(ImVector_ImWchar* p);
#endif //CIMGUI_INCLUDED

View File

@@ -1,4 +1,5 @@
#ifndef CIMGUI_INCLUDED
#define CIMGUI_INCLUDED
#include <stdio.h>
#include <stdint.h>
#if defined _WIN32 || defined __CYGWIN__
@@ -85,6 +86,7 @@ CIMGUI_API ImVector_ImWchar* ImVector_ImWchar_create();
CIMGUI_API void ImVector_ImWchar_destroy(ImVector_ImWchar* p);
CIMGUI_API void ImVector_ImWchar_Init(ImVector_ImWchar* p);
CIMGUI_API void ImVector_ImWchar_UnInit(ImVector_ImWchar* p);
#endif //CIMGUI_INCLUDED

1104
generator/cpp2ffi.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -94,7 +94,8 @@ local cimgui_overloads = {
--------------------------header definitions
local cimgui_header =
[[//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version XXX from Dear ImGui https://github.com/ocornut/imgui]]
//based on imgui.h file version XXX from Dear ImGui https://github.com/ocornut/imgui
]]
local gdefines = {} --for FLT_MAX and others
--------------------------------------------------------------------------
--helper functions
@@ -410,6 +411,10 @@ local function struct_parser()
table.insert(structcdefs,line)
return
end
if line:match"^%s*static char" then
assert(line:match"EmptyString",line)
return --skip that static chat EmtyString
end
--if in_function discard
if in_functionst then
@@ -433,7 +438,7 @@ local function struct_parser()
elseif line:match("public:") then
--nothing
else
local linea = line:gsub("%S+",{class="struct",mutable="",static=""})
local linea = line:gsub("%S+",{class="struct",mutable=""})
local template = linea:match("ImVector<(.+)>")
if template then
local te = template:gsub("%s","_")
@@ -999,6 +1004,9 @@ local function gen_structs_and_enums_table(cdefs)
end
--split type name1,name2; in several lines
local typen,rest = line:match("([^,]+)%s(%S+[,;])")
if not typen then -- Lets try Type*name
typen,rest = line:match("([^,]+%*)(%S+[,;])")
end
--local template_type = typen:match("/%*<(.+)>%*/")
--if template_type then typen = typen:match("(.+)/%*") end
local template_type = typen:match("ImVector_(.+)")

23
generator/generator2.bat Normal file
View File

@@ -0,0 +1,23 @@
:: this script must be executed in this directory
:: all the output goes to generator/output folder
:: .cpp and .h files:
:: cimgui.h and cimgui.cpp with gcc preprocess
:: cimgui_nopreprocess.h and cimgui_nopreprocess.cpp generated without preprocess
:: cimgui_impl.h with implementation function cdefs
:: lua and json files:
:: definitions.lua for function definitions
:: structs_and_enums.lua with struct and enum information-definitions
:: impl_definitions.lua for implementation function definitions
:: set your PATH if necessary for LuaJIT or Lua5.1 or luajit with: (for example)
set PATH=%PATH%;C:\luaGL;C:\mingw32\bin;
:: set PATH=%PATH%;C:\luaGL;C:\i686-7.2.0-release-posix-dwarf-rt_v5-rev1\mingw32\bin;
:: set PATH=%PATH%;C:\luaGL\sources\luajit-master\luajit-master\bin\mingw32;C:\mingw32\bin;
::process files
:: arg[1] compiler name gcc, clang, cl or nocompiler
:: arg[2..n] name of implementations to generate
luajit ./generator2.lua gcc glfw opengl3 opengl2 sdl
::leave console open
cmd /k

609
generator/generator2.lua Normal file
View File

@@ -0,0 +1,609 @@
--------------------------------------------------------------------------
--script for auto_funcs.h and auto_funcs.cpp generation
--expects LuaJIT
--------------------------------------------------------------------------
assert(_VERSION=='Lua 5.1',"Must use LuaJIT")
assert(bit,"Must use LuaJIT")
local script_args = {...}
local COMPILER = script_args[1]
local CPRE,CTEST
if COMPILER == "gcc" or COMPILER == "clang" then
CPRE = COMPILER..[[ -E -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ]]
CTEST = COMPILER.." --version"
elseif COMPILER == "cl" then
CPRE = COMPILER..[[ /E /DIMGUI_DISABLE_OBSOLETE_FUNCTIONS /DIMGUI_API="" /DIMGUI_IMPL_API="" ]]
CTEST = COMPILER
else
print("Working without compiler ")
end
--test compiler present
local HAVE_COMPILER = false
if CTEST then
local pipe,err = io.popen(CTEST,"r")
if pipe then
local str = pipe:read"*a"
print(str)
pipe:close()
if str=="" then
HAVE_COMPILER = false
else
HAVE_COMPILER = true
end
else
HAVE_COMPILER = false
print(err)
end
assert(HAVE_COMPILER,"gcc, clang or cl needed to run script")
end --CTEST
print("HAVE_COMPILER",HAVE_COMPILER)
--get implementations
local implementations = {}
for i=2,#script_args do table.insert(implementations,script_args[i]) end
--------------------------------------------------------------------------
--this table has the functions to be skipped in generation
--------------------------------------------------------------------------
local cimgui_manuals = {
igLogText = true,
ImGuiTextBuffer_appendf = true,
igColorConvertRGBtoHSV = true,
igColorConvertHSVtoRGB = true
}
--------------------------------------------------------------------------
--this table is a dictionary to force a naming of function overloading (instead of algorythmic generated)
--first level is cimguiname without postfix, second level is the signature of the function, value is the
--desired name
---------------------------------------------------------------------------
local cimgui_overloads = {
igPushID = {
--["(const char*)"] = "igPushIDStr",
["(const char*,const char*)"] = "igPushIDRange",
--["(const void*)"] = "igPushIDPtr",
--["(int)"] = "igPushIDInt"
},
igGetID = {
["(const char*,const char*)"] = "igGetIDRange",
},
ImDrawList_AddText = {
["(const ImVec2,ImU32,const char*,const char*)"] = "ImDrawList_AddText",
},
igGetColorU32 = {
["(ImGuiCol,float)"] = "igGetColorU32",
},
igCollapsingHeader = {
["(const char*,ImGuiTreeNodeFlags)"] = "igCollapsingHeader",
},
igCombo = {
["(const char*,int*,const char* const[],int,int)"] = "igCombo",
},
igPlotLines = {
["(const char*,const float*,int,int,const char*,float,float,ImVec2,int)"] = "igPlotLines",
},
igBeginChild = {
["(const char*,const ImVec2,bool,ImGuiWindowFlags)"] = "igBeginChild",
},
igSelectable = {
["(const char*,bool,ImGuiSelectableFlags,const ImVec2)"] = "igSelectable"
},
igPushStyleColor = {
["(ImGuiCol,const ImVec4)"] = "igPushStyleColor"
}
}
--------------------------header definitions
local cimgui_header =
[[//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version XXX from Dear ImGui https://github.com/ocornut/imgui
]]
local gdefines = {} --for FLT_MAX and others
--------------------------------------------------------------------------
--helper functions
---------------------------minimal preprocessor without compiler for ImGui.h
local function filelines(file,locats)
local split_comment = require"cpp2ffi".split_comment
local iflevels = {}
--generated known prepros
local prepro = {
["#if"]={
[ "defined(__clang__) || defined(__GNUC__)" ]=false,
[ "defined(__clang__)" ]=false,
[ "defined(_MSC_VER) && !defined(__clang__)" ]=false,
[ "!defined(IMGUI_DISABLE_INCLUDE_IMCONFIG_H) || defined(IMGUI_INCLUDE_IMCONFIG_H)" ]=false,
[ "!defined(IMGUI_IMPL_OPENGL_LOADER_GL3W) \\" ]=false,
},
["#elif"]={
[ "defined(__GNUC__) && __GNUC__ >= 8" ]=false,
[ "(defined(__clang__) || defined(__GNUC__)) && (__cplusplus < 201100)" ]=false,
},
["#ifdef"]={
[ "IM_VEC4_CLASS_EXTRA" ]=false,
[ "IMGUI_USER_CONFIG" ]=false,
[ "IMGUI_INCLUDE_IMGUI_USER_H" ]=false,
[ "IMGUI_USE_BGRA_PACKED_COLOR" ]=false,
[ "IM_VEC2_CLASS_EXTRA" ]=false,
},
["#ifndef"]={
[ "IMGUI_API" ]=false,
[ "IMGUI_IMPL_API" ]=false,
[ "IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT" ]=true,
[ "IM_ASSERT" ]=false,
[ "ImTextureID" ]=true,
[ "ImDrawIdx" ]=true,
[ "IMGUI_DISABLE_OBSOLETE_FUNCTIONS" ]=false,
},
}
local function prepro_boolif(pre,cond)
local conds = prepro[pre]
assert(conds,pre.." has no conds-----------------------------")
local res = conds[cond]
--assert(type(res)~="nil",cond.." not found")
if type(res)=="nil" then
print(pre,cond,"not found in precompiler database, returning false.")
res = false
end
return res
end
local function location_it()
repeat
local line = file:read"*l"
if not line then return nil end
line,_ = split_comment(line)
--if line:sub(1,1) == "#" then
if line:match("^%s*#") then
local pre,cond = line:match("^%s*(#%S*)%s+(.*)%s*$")
if line:match("#if") then
iflevels[#iflevels +1 ] = prepro_boolif(pre,cond)
elseif line:match("#endif") then
iflevels[#iflevels] = nil
elseif line:match("#elif") then
if not iflevels[#iflevels] then
iflevels[#iflevels] = prepro_boolif(pre,cond)
else --was true
iflevels[#iflevels] = false
end
elseif line:match("#else") then
iflevels[#iflevels] = not iflevels[#iflevels]
else
if not (pre:match("#define") or pre:match"#include" or pre:match"#pragma") then
print("not expected preprocessor directive ",pre)
end
end
-- skip
elseif #iflevels == 0 or iflevels[#iflevels] then
-- drop IMGUI_APIX
line = line:gsub("IMGUI_IMPL_API","")
-- drop IMGUI_API
line = line:gsub("IMGUI_API","")
return line,locats[1]
end
until false
end
return location_it
end
--------------------------------functions for C generation
local function func_header_impl_generate(FP)
local outtab = {}
for _,t in ipairs(FP.funcdefs) do
if t.cimguiname then
local cimf = FP.defsT[t.cimguiname]
local def = cimf[t.signature]
if def.ret then --not constructor
local addcoment = def.comment or ""
if def.stname == "" then --ImGui namespace or top level
table.insert(outtab,"CIMGUI_API".." "..def.ret.." "..def.ov_cimguiname..def.args..";"..addcoment.."\n")
else
error("class function in implementations")
end
end
else --not cimguiname
table.insert(outtab,t.comment:gsub("%%","%%%%").."\n")-- %% substitution for gsub
end
end
local cfuncsstr = table.concat(outtab)
cfuncsstr = cfuncsstr:gsub("\n+","\n") --several empty lines to one empty line
return cfuncsstr
end
local function func_header_generate(FP)
local outtab = {}
table.insert(outtab,"#ifndef CIMGUI_DEFINE_ENUMS_AND_STRUCTS\n")
for k,v in pairs(FP.embeded_structs) do
table.insert(outtab,"typedef "..v.." "..k..";\n")
end
for ttype,v in pairs(FP.templates) do
for ttypein,_ in pairs(v) do
local te = ttypein:gsub("%s","_")
te = te:gsub("%*","Ptr")
table.insert(outtab,"typedef "..ttype.."<"..ttypein.."> "..ttype.."_"..te..";\n")
end
end
table.insert(outtab,"#endif //CIMGUI_DEFINE_ENUMS_AND_STRUCTS\n")
for _,t in ipairs(FP.funcdefs) do
if t.cimguiname then
local cimf = FP.defsT[t.cimguiname]
local def = cimf[t.signature]
assert(def,t.signature..t.cimguiname)
local manual = FP.get_manuals(def)
if not manual then
local addcoment = def.comment or ""
local empty = def.args:match("^%(%)") --no args
if def.constructor then
assert(def.stname ~= "","constructor without struct")
table.insert(outtab,"CIMGUI_API "..def.stname.."* "..def.ov_cimguiname ..(empty and "(void)" or def.args)..";"..addcoment.."\n")
elseif def.destructor then
table.insert(outtab,"CIMGUI_API void "..def.ov_cimguiname..def.args..";"..addcoment.."\n")
else --not constructor
if def.stname == "" then --ImGui namespace or top level
table.insert(outtab,"CIMGUI_API "..def.ret.." ".. def.ov_cimguiname ..(empty and "(void)" or def.args)..";"..addcoment.."\n")
else
table.insert(outtab,"CIMGUI_API "..def.ret.." "..def.ov_cimguiname..def.args..";"..addcoment.."\n")
end
end
end
else --not cimguiname
table.insert(outtab,t.comment:gsub("%%","%%%%").."\n")-- %% substitution for gsub
end
end
local cfuncsstr = table.concat(outtab)
cfuncsstr = cfuncsstr:gsub("\n+","\n") --several empty lines to one empty line
return cfuncsstr
end
local function ImGui_f_implementation(outtab,def)
local ptret = def.retref and "&" or ""
table.insert(outtab,"CIMGUI_API".." "..def.ret.." "..def.ov_cimguiname..def.args.."\n")
table.insert(outtab,"{\n")
if def.isvararg then
local call_args = def.call_args:gsub("%.%.%.","args")
table.insert(outtab," va_list args;\n")
table.insert(outtab," va_start(args, fmt);\n")
if def.ret~="void" then
table.insert(outtab," "..def.ret.." ret = ImGui::"..def.funcname.."V"..call_args..";\n")
else
table.insert(outtab," ImGui::"..def.funcname.."V"..call_args..";\n")
end
table.insert(outtab," va_end(args);\n")
if def.ret~="void" then
table.insert(outtab," return ret;\n")
end
elseif def.nonUDT then
if def.nonUDT == 1 then
table.insert(outtab," *pOut = ImGui::"..def.funcname..def.call_args..";\n")
else --nonUDT==2
table.insert(outtab," "..def.retorig.." ret = ImGui::"..def.funcname..def.call_args..";\n")
table.insert(outtab," "..def.ret.." ret2 = "..def.retorig.."ToSimple(ret);\n")
table.insert(outtab," return ret2;\n")
end
else --standard ImGui
table.insert(outtab," return "..ptret.."ImGui::"..def.funcname..def.call_args..";\n")
end
table.insert(outtab,"}\n")
end
local function struct_f_implementation(outtab,def)
local empty = def.args:match("^%(%)") --no args
local ptret = def.retref and "&" or ""
local imgui_stname = def.stname
table.insert(outtab,"CIMGUI_API".." "..def.ret.." "..def.ov_cimguiname..def.args.."\n")
table.insert(outtab,"{\n")
if def.isvararg then
local call_args = def.call_args:gsub("%.%.%.","args")
table.insert(outtab," va_list args;\n")
table.insert(outtab," va_start(args, fmt);\n")
if def.ret~="void" then
table.insert(outtab," "..def.ret.." ret = self->"..def.funcname.."V"..call_args..";\n")
else
table.insert(outtab," self->"..def.funcname.."V"..call_args..";\n")
end
table.insert(outtab," va_end(args);\n")
if def.ret~="void" then
table.insert(outtab," return ret;\n")
end
elseif def.nonUDT then
if def.nonUDT == 1 then
table.insert(outtab," *pOut = self->"..def.funcname..def.call_args..";\n")
else --nonUDT==2
table.insert(outtab," "..def.retorig.." ret = self->"..def.funcname..def.call_args..";\n")
table.insert(outtab," "..def.ret.." ret2 = "..def.retorig.."ToSimple(ret);\n")
table.insert(outtab," return ret2;\n")
end
else --standard struct
table.insert(outtab," return "..ptret.."self->"..def.funcname..def.call_args..";\n")
end
table.insert(outtab,"}\n")
end
local function func_implementation(FP)
local outtab = {}
for _,t in ipairs(FP.funcdefs) do
repeat -- continue simulation
if not t.cimguiname then break end
local cimf = FP.defsT[t.cimguiname]
local def = cimf[t.signature]
assert(def)
local manual = FP.get_manuals(def)
if not manual then
if def.constructor then
assert(def.stname ~= "","constructor without struct")
local empty = def.args:match("^%(%)") --no args
table.insert(outtab,"CIMGUI_API "..def.stname.."* "..def.ov_cimguiname..(empty and "(void)" or def.args).."\n")
table.insert(outtab,"{\n")
table.insert(outtab," return IM_NEW("..def.stname..")"..def.call_args..";\n")
table.insert(outtab,"}\n")
elseif def.destructor then
local args = "("..def.stname.."* self)"
local fname = def.stname.."_destroy"
table.insert(outtab,"CIMGUI_API void "..fname..args.."\n")
table.insert(outtab,"{\n")
table.insert(outtab," IM_DELETE(self);\n")
table.insert(outtab,"}\n")
elseif def.stname == "" then
ImGui_f_implementation(outtab,def)
else -- stname
struct_f_implementation(outtab,def)
end
end
until true
end
return table.concat(outtab)
end
-------------------functions for getting and setting defines
local function get_defines(t)
if COMPILER == "cl" then print"can't get defines with cl compiler"; return {} end
local pipe,err = io.popen(COMPILER..[[ -E -dM -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ../imgui/imgui.h]],"r")
local defines = {}
while true do
local line = pipe:read"*l"
if not line then break end
local key,value = line:match([[#define%s+(%S+)%s+(.+)]])
if not key or not value then
--print(line)
else
defines[key]=value
end
end
pipe:close()
--require"anima.utils"
--prtable(defines)
--FLT_MAX
local ret = {}
for i,v in ipairs(t) do
local aa = defines[v]
while true do
local tmp = defines[aa]
if not tmp then
break
else
aa = tmp
end
end
ret[v] = aa
end
return ret
end
--subtitution of FLT_MAX value for FLT_MAX
local function set_defines(fdefs)
for k,defT in pairs(fdefs) do
for i,def in ipairs(defT) do
for name,default in pairs(def.defaults) do
if default == gdefines.FLT_MAX then
def.defaults[name] = "FLT_MAX"
end
end
end
end
end
--this creates defsBystruct in case you need to list by struct container
local function DefsByStruct(FP)
local structs = {}
for fun,defs in pairs(FP.defsT) do
local stname = defs[1].stname
structs[stname] = structs[stname] or {}
table.insert(structs[stname],defs)--fun)
end
FP.defsBystruct = structs
end
--load parser module
local cpp2ffi = require"cpp2ffi"
local read_data = cpp2ffi.read_data
local save_data = cpp2ffi.save_data
local copyfile = cpp2ffi.copyfile
local serializeTableF = cpp2ffi.serializeTableF
----------custom ImVector templates
local function generate_templates(code,templates)
table.insert(code,[[typedef struct ImVector{int Size;int Capacity;void* Data;} ImVector;]].."\n")
for ttype,v in pairs(templates) do
--local te = k:gsub("%s","_")
--te = te:gsub("%*","Ptr")
if ttype == "ImVector" then
for te,newte in pairs(v) do
table.insert(code,"typedef struct ImVector_"..newte.." {int Size;int Capacity;"..te.."* Data;} ImVector_"..newte..";\n")
end
end
end
end
--generate cimgui.cpp cimgui.h
local function cimgui_generation(parser)
local hstrfile = read_data"./cimgui_template.h"
local outpre,outpost = parser:gen_structs_and_enums()
local outtab = {}
generate_templates(outtab,parser.templates)
local cstructsstr = outpre..table.concat(outtab,"")..outpost
hstrfile = hstrfile:gsub([[#include "imgui_structs%.h"]],cstructsstr)
local cfuncsstr = func_header_generate(parser)
hstrfile = hstrfile:gsub([[#include "auto_funcs%.h"]],cfuncsstr)
save_data("./output/cimgui.h",cimgui_header,hstrfile)
--merge it in cimgui_template.cpp to cimgui.cpp
local cimplem = func_implementation(parser)
local hstrfile = read_data"./cimgui_template.cpp"
hstrfile = hstrfile:gsub([[#include "auto_funcs%.cpp"]],cimplem)
save_data("./output/cimgui.cpp",cimgui_header,hstrfile)
end
--------------------------------------------------------
-----------------------------do it----------------------
--------------------------------------------------------
--get imgui.h version--------------------------
local pipe,err = io.open("../imgui/imgui.h","r")
if not pipe then
error("could not open file:"..err)
end
local imgui_version
while true do
local line = pipe:read"*l"
imgui_version = line:match([[#define%s+IMGUI_VERSION%s+(".+")]])
if imgui_version then break end
end
pipe:close()
cimgui_header = cimgui_header:gsub("XXX",imgui_version)
print("IMGUI_VERSION",imgui_version)
--get some defines----------------------------
if HAVE_COMPILER then
gdefines = get_defines{"IMGUI_VERSION","FLT_MAX"}
end
--generation
print("------------------generation with "..COMPILER.."------------------------")
local typedefs_dict2
--prepare parser
local parser1 = cpp2ffi.Parser()
parser1.getCname = function(stname,funcname)
local pre = (stname == "") and "ig" or stname.."_"
return pre..funcname
end
parser1.cname_overloads = cimgui_overloads
parser1.manuals = cimgui_manuals
parser1.UDTs = {"ImVec2","ImVec4","ImColor"}
local pipe,err
if HAVE_COMPILER then
pipe,err = io.popen(CPRE..[[../imgui/imgui.h]],"r")
else
pipe,err = io.open([[../imgui/imgui.h]],"r")
end
if not pipe then
error("could not execute gcc "..err)
end
local iterator = (HAVE_COMPILER and cpp2ffi.location) or filelines
for line in iterator(pipe,{"imgui"},{}) do
parser1:insert(line)
end
pipe:close()
parser1:do_parse()
--parser1:dump_alltypes()
--parser1:printItems()
save_data("./output/overloads.txt",parser1.overloadstxt)
cimgui_generation(parser1)
----------save fundefs in definitions.lua for using in bindings
--DefsByStruct(pFP)
set_defines(parser1.defsT)
save_data("./output/definitions.lua",serializeTableF(parser1.defsT))
----------save struct and enums lua table in structs_and_enums.lua for using in bindings
local structs_and_enums_table = parser1:gen_structs_and_enums_table()
save_data("./output/structs_and_enums.lua",serializeTableF(structs_and_enums_table))
save_data("./output/typedefs_dict.lua",serializeTableF(parser1.typedefs_dict))
--check every function has ov_cimguiname
-- for k,v in pairs(parser1.defsT) do
-- for _,def in ipairs(v) do
-- assert(def.ov_cimguiname)
-- end
-- end
--=================================Now implementations
local parser2
if #implementations > 0 then
parser2 = cpp2ffi.Parser()
for i,impl in ipairs(implementations) do
local source = [[../imgui/examples/imgui_impl_]].. impl .. ".h "
local locati = [[imgui_impl_]].. impl
local pipe,err
if HAVE_COMPILER then
pipe,err = io.popen(CPRE..source,"r")
else
pipe,err = io.open(source,"r")
end
if not pipe then
error("could not get file: "..err)
end
local iterator = (HAVE_COMPILER and cpp2ffi.location) or filelines
for line,locat in iterator(pipe,{locati},{}) do
--local line, comment = split_comment(line)
parser2:insert(line)
end
pipe:close()
end
parser2:do_parse()
-- save ./cimgui_impl.h
local cfuncsstr = func_header_impl_generate(parser2)
local cstructstr1,cstructstr2 = parser2:gen_structs_and_enums()
save_data("./output/cimgui_impl.h",cstructstr1,cstructstr2,cfuncsstr)
----------save fundefs in impl_definitions.lua for using in bindings
save_data("./output/impl_definitions.lua",serializeTableF(parser2.defsT))
end -- #implementations > 0 then
-------------------------------json saving
--avoid mixed tables (with string and integer keys)
local function json_prepare(defs)
--delete signatures in function
for k,def in pairs(defs) do
for k2,v in pairs(def) do
if type(k2)=="string" then
def[k2] = nil
end
end
end
return defs
end
---[[
local json = require"json"
save_data("./output/definitions.json",json.encode(json_prepare(parser1.defsT)))
save_data("./output/structs_and_enums.json",json.encode(structs_and_enums_table))
save_data("./output/typedefs_dict.json",json.encode(parser1.typedefs_dict))
if parser2 then
save_data("./output/impl_definitions.json",json.encode(json_prepare(parser2.defsT)))
end
--]]
-------------------copy C files to repo root
copyfile("./output/cimgui.h", "../cimgui.h")
copyfile("./output/cimgui.cpp", "../cimgui.cpp")
print"all done!!"

View File

@@ -27,7 +27,8 @@ local json = { _version = "0.1.1" }
-------------------------------------------------------------------------------
-- Encode
-------------------------------------------------------------------------------
local TAB = " "
local rep = string.rep
local encode
local escape_char_map = {
@@ -56,10 +57,10 @@ local function encode_nil(val)
end
local function encode_table(val, stack)
local function encode_table(val, stack,level,isvalue)
local res = {}
stack = stack or {}
level = level or 0
-- Circular reference?
if stack[val] then error("circular reference") end
@@ -77,38 +78,53 @@ local function encode_table(val, stack)
if n ~= #val then
error("invalid table: sparse array")
end
-- Encode
for i, v in ipairs(val) do
table.insert(res, encode(v, stack))
table.insert(res, encode(v, stack,level+1))
end
stack[val] = nil
return "[" .. table.concat(res, ",") .. "]"
local inner = table.concat(res, ",\n")
if #inner > 0 then inner = "\n"..inner.."\n"..rep(TAB,level) end
return rep(isvalue and "" or TAB,level).."[" .. inner .. "]"
else
---[[
local ordered_keys = {}
for k,v in pairs(val) do
table.insert(ordered_keys,k)
end
table.sort(ordered_keys)
-- Treat as an object
for k, v in pairs(val) do
for _,k in ipairs(ordered_keys) do
local v = val[k]
--]]
--for k, v in pairs(val) do
if type(k) ~= "string" then
error("invalid table: mixed or invalid key types")
end
table.insert(res, encode(k, stack) .. ":" .. encode(v, stack))
table.insert(res, encode(k, stack,level+1) .. ": " .. encode(v, stack,level+1,true))
end
stack[val] = nil
return "{" .. table.concat(res, ",") .. "}"
local inner = table.concat(res, ",\n")
if #inner > 0 then inner = "\n"..inner.."\n"..rep(TAB,level) end
return rep(isvalue and "" or TAB,level).."{" .. inner .. "}"
end
end
local function encode_string(val)
return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
local function encode_string(val,stack,level,isvalue)
return rep(isvalue and "" or TAB,level)..'"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
end
local function encode_number(val)
local function encode_number(val,stack,level,isvalue)
-- Check for NaN, -inf and inf
if val ~= val or val <= -math.huge or val >= math.huge then
error("unexpected number value '" .. tostring(val) .. "'")
end
return string.format("%.14g", val)
return rep(isvalue and "" or TAB,level)..string.format("%.14g", val)
end
@@ -121,11 +137,11 @@ local type_func_map = {
}
encode = function(val, stack)
encode = function(val, stack,level,isvalue)
local t = type(val)
local f = type_func_map[t]
if f then
return f(val, stack)
return f(val, stack,level,isvalue)
end
error("unexpected type '" .. t .. "'")
end

View File

@@ -1,5 +1,6 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.66" from Dear ImGui https://github.com/ocornut/imgui
//based on imgui.h file version "1.66b" from Dear ImGui https://github.com/ocornut/imgui
#include "./imgui/imgui.h"
#include "cimgui.h"
@@ -77,6 +78,10 @@ CIMGUI_API void igShowDemoWindow(bool* p_open)
{
return ImGui::ShowDemoWindow(p_open);
}
CIMGUI_API void igShowAboutWindow(bool* p_open)
{
return ImGui::ShowAboutWindow(p_open);
}
CIMGUI_API void igShowMetricsWindow(bool* p_open)
{
return ImGui::ShowMetricsWindow(p_open);
@@ -1434,6 +1439,50 @@ CIMGUI_API void ImGuiIO_destroy(ImGuiIO* self)
{
IM_DELETE(self);
}
CIMGUI_API ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(void)
{
return IM_NEW(ImGuiInputTextCallbackData)();
}
CIMGUI_API void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self)
{
IM_DELETE(self);
}
CIMGUI_API void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self,int pos,int bytes_count)
{
return self->DeleteChars(pos,bytes_count);
}
CIMGUI_API void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self,int pos,const char* text,const char* text_end)
{
return self->InsertChars(pos,text,text_end);
}
CIMGUI_API bool ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self)
{
return self->HasSelection();
}
CIMGUI_API ImGuiPayload* ImGuiPayload_ImGuiPayload(void)
{
return IM_NEW(ImGuiPayload)();
}
CIMGUI_API void ImGuiPayload_destroy(ImGuiPayload* self)
{
IM_DELETE(self);
}
CIMGUI_API void ImGuiPayload_Clear(ImGuiPayload* self)
{
return self->Clear();
}
CIMGUI_API bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type)
{
return self->IsDataType(type);
}
CIMGUI_API bool ImGuiPayload_IsPreview(ImGuiPayload* self)
{
return self->IsPreview();
}
CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self)
{
return self->IsDelivery();
}
CIMGUI_API ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(void)
{
return IM_NEW(ImGuiOnceUponAFrame)();
@@ -1614,49 +1663,25 @@ CIMGUI_API void ImGuiStorage_BuildSortByKey(ImGuiStorage* self)
{
return self->BuildSortByKey();
}
CIMGUI_API ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(void)
CIMGUI_API ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count,float items_height)
{
return IM_NEW(ImGuiInputTextCallbackData)();
return IM_NEW(ImGuiListClipper)(items_count,items_height);
}
CIMGUI_API void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self)
CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self)
{
IM_DELETE(self);
}
CIMGUI_API void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self,int pos,int bytes_count)
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self)
{
return self->DeleteChars(pos,bytes_count);
return self->Step();
}
CIMGUI_API void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self,int pos,const char* text,const char* text_end)
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height)
{
return self->InsertChars(pos,text,text_end);
return self->Begin(items_count,items_height);
}
CIMGUI_API bool ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self)
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* self)
{
return self->HasSelection();
}
CIMGUI_API ImGuiPayload* ImGuiPayload_ImGuiPayload(void)
{
return IM_NEW(ImGuiPayload)();
}
CIMGUI_API void ImGuiPayload_destroy(ImGuiPayload* self)
{
IM_DELETE(self);
}
CIMGUI_API void ImGuiPayload_Clear(ImGuiPayload* self)
{
return self->Clear();
}
CIMGUI_API bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type)
{
return self->IsDataType(type);
}
CIMGUI_API bool ImGuiPayload_IsPreview(ImGuiPayload* self)
{
return self->IsPreview();
}
CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self)
{
return self->IsDelivery();
return self->End();
}
CIMGUI_API ImColor* ImColor_ImColor(void)
{
@@ -1690,26 +1715,6 @@ CIMGUI_API ImColor ImColor_HSV(ImColor* self,float h,float s,float v,float a)
{
return self->HSV(h,s,v,a);
}
CIMGUI_API ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count,float items_height)
{
return IM_NEW(ImGuiListClipper)(items_count,items_height);
}
CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self)
{
IM_DELETE(self);
}
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self)
{
return self->Step();
}
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height)
{
return self->Begin(items_count,items_height);
}
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* self)
{
return self->End();
}
CIMGUI_API ImDrawCmd* ImDrawCmd_ImDrawCmd(void)
{
return IM_NEW(ImDrawCmd)();

View File

@@ -1,5 +1,7 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.66" from Dear ImGui https://github.com/ocornut/imgui
//based on imgui.h file version "1.66b" from Dear ImGui https://github.com/ocornut/imgui
#ifndef CIMGUI_INCLUDED
#define CIMGUI_INCLUDED
#include <stdio.h>
#include <stdint.h>
#if defined _WIN32 || defined __CYGWIN__
@@ -330,6 +332,7 @@ enum ImGuiNavInput_
};
enum ImGuiConfigFlags_
{
ImGuiConfigFlags_None = 0,
ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
ImGuiConfigFlags_NavEnableSetMousePos = 1 << 2,
@@ -341,6 +344,7 @@ enum ImGuiConfigFlags_
};
enum ImGuiBackendFlags_
{
ImGuiBackendFlags_None = 0,
ImGuiBackendFlags_HasGamepad = 1 << 0,
ImGuiBackendFlags_HasMouseCursors = 1 << 1,
ImGuiBackendFlags_HasSetMousePos = 1 << 2
@@ -525,6 +529,8 @@ struct ImGuiIO
bool ConfigMacOSXBehaviors;
bool ConfigInputTextCursorBlink;
bool ConfigResizeWindowsFromEdges;
const char* BackendPlatformName;
const char* BackendRendererName;
const char* (*GetClipboardTextFn)(void* user_data);
void (*SetClipboardTextFn)(void* user_data, const char* text);
void* ClipboardUserData;
@@ -572,43 +578,6 @@ struct ImGuiIO
float NavInputsDownDuration[ImGuiNavInput_COUNT];
float NavInputsDownDurationPrev[ImGuiNavInput_COUNT];
};
typedef struct ImVector{int Size;int Capacity;void* Data;} ImVector;
typedef struct ImVector_float {int Size;int Capacity;float* Data;} ImVector_float;
typedef struct ImVector_ImWchar {int Size;int Capacity;ImWchar* Data;} ImVector_ImWchar;
typedef struct ImVector_ImFontConfig {int Size;int Capacity;ImFontConfig* Data;} ImVector_ImFontConfig;
typedef struct ImVector_ImFontGlyph {int Size;int Capacity;ImFontGlyph* Data;} ImVector_ImFontGlyph;
typedef struct ImVector_unsigned_char {int Size;int Capacity;unsigned char* Data;} ImVector_unsigned_char;
typedef struct ImVector_Pair {int Size;int Capacity;Pair* Data;} ImVector_Pair;
typedef struct ImVector_CustomRect {int Size;int Capacity;CustomRect* Data;} ImVector_CustomRect;
typedef struct ImVector_ImDrawChannel {int Size;int Capacity;ImDrawChannel* Data;} ImVector_ImDrawChannel;
typedef struct ImVector_char {int Size;int Capacity;char* Data;} ImVector_char;
typedef struct ImVector_ImTextureID {int Size;int Capacity;ImTextureID* Data;} ImVector_ImTextureID;
typedef struct ImVector_ImDrawVert {int Size;int Capacity;ImDrawVert* Data;} ImVector_ImDrawVert;
typedef struct ImVector_ImDrawCmd {int Size;int Capacity;ImDrawCmd* Data;} ImVector_ImDrawCmd;
typedef struct ImVector_ImFontPtr {int Size;int Capacity;ImFont** Data;} ImVector_ImFontPtr;
typedef struct ImVector_TextRange {int Size;int Capacity;TextRange* Data;} ImVector_TextRange;
typedef struct ImVector_ImVec4 {int Size;int Capacity;ImVec4* Data;} ImVector_ImVec4;
typedef struct ImVector_ImDrawIdx {int Size;int Capacity;ImDrawIdx* Data;} ImVector_ImDrawIdx;
typedef struct ImVector_ImVec2 {int Size;int Capacity;ImVec2* Data;} ImVector_ImVec2;
struct ImGuiOnceUponAFrame
{
int RefFrame;
};
struct ImGuiTextFilter
{
char InputBuf[256];
ImVector_TextRange Filters;
int CountGrep;
};
struct ImGuiTextBuffer
{
ImVector_char Buf;
char EmptyString[1];
};
struct ImGuiStorage
{
ImVector_Pair Data;
};
struct ImGuiInputTextCallbackData
{
ImGuiInputTextFlags EventFlag;
@@ -642,9 +611,41 @@ struct ImGuiPayload
bool Preview;
bool Delivery;
};
struct ImColor
typedef struct ImVector{int Size;int Capacity;void* Data;} ImVector;
typedef struct ImVector_float {int Size;int Capacity;float* Data;} ImVector_float;
typedef struct ImVector_ImWchar {int Size;int Capacity;ImWchar* Data;} ImVector_ImWchar;
typedef struct ImVector_ImFontConfig {int Size;int Capacity;ImFontConfig* Data;} ImVector_ImFontConfig;
typedef struct ImVector_ImFontGlyph {int Size;int Capacity;ImFontGlyph* Data;} ImVector_ImFontGlyph;
typedef struct ImVector_unsigned_char {int Size;int Capacity;unsigned char* Data;} ImVector_unsigned_char;
typedef struct ImVector_Pair {int Size;int Capacity;Pair* Data;} ImVector_Pair;
typedef struct ImVector_CustomRect {int Size;int Capacity;CustomRect* Data;} ImVector_CustomRect;
typedef struct ImVector_ImDrawChannel {int Size;int Capacity;ImDrawChannel* Data;} ImVector_ImDrawChannel;
typedef struct ImVector_char {int Size;int Capacity;char* Data;} ImVector_char;
typedef struct ImVector_ImTextureID {int Size;int Capacity;ImTextureID* Data;} ImVector_ImTextureID;
typedef struct ImVector_ImDrawVert {int Size;int Capacity;ImDrawVert* Data;} ImVector_ImDrawVert;
typedef struct ImVector_ImDrawCmd {int Size;int Capacity;ImDrawCmd* Data;} ImVector_ImDrawCmd;
typedef struct ImVector_ImFontPtr {int Size;int Capacity;ImFont** Data;} ImVector_ImFontPtr;
typedef struct ImVector_TextRange {int Size;int Capacity;TextRange* Data;} ImVector_TextRange;
typedef struct ImVector_ImVec4 {int Size;int Capacity;ImVec4* Data;} ImVector_ImVec4;
typedef struct ImVector_ImDrawIdx {int Size;int Capacity;ImDrawIdx* Data;} ImVector_ImDrawIdx;
typedef struct ImVector_ImVec2 {int Size;int Capacity;ImVec2* Data;} ImVector_ImVec2;
struct ImGuiOnceUponAFrame
{
ImVec4 Value;
int RefFrame;
};
struct ImGuiTextFilter
{
char InputBuf[256];
ImVector_TextRange Filters;
int CountGrep;
};
struct ImGuiTextBuffer
{
ImVector_char Buf;
};
struct ImGuiStorage
{
ImVector_Pair Data;
};
struct ImGuiListClipper
{
@@ -652,6 +653,10 @@ struct ImGuiListClipper
float ItemsHeight;
int ItemsCount, StepNo, DisplayStart, DisplayEnd;
};
struct ImColor
{
ImVec4 Value;
};
typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd);
struct ImDrawCmd
{
@@ -686,6 +691,7 @@ enum ImDrawCornerFlags_
};
enum ImDrawListFlags_
{
ImDrawListFlags_None = 0,
ImDrawListFlags_AntiAliasedLines = 1 << 0,
ImDrawListFlags_AntiAliasedFill = 1 << 1
};
@@ -865,6 +871,7 @@ CIMGUI_API void igEndFrame(void);
CIMGUI_API void igRender(void);
CIMGUI_API ImDrawData* igGetDrawData(void);
CIMGUI_API void igShowDemoWindow(bool* p_open);
CIMGUI_API void igShowAboutWindow(bool* p_open);
CIMGUI_API void igShowMetricsWindow(bool* p_open);
CIMGUI_API void igShowStyleEditor(ImGuiStyle* ref);
CIMGUI_API bool igShowStyleSelector(const char* label);
@@ -1195,6 +1202,17 @@ CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self,const char* utf8_ch
CIMGUI_API void ImGuiIO_ClearInputCharacters(ImGuiIO* self);
CIMGUI_API ImGuiIO* ImGuiIO_ImGuiIO(void);
CIMGUI_API void ImGuiIO_destroy(ImGuiIO* self);
CIMGUI_API ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(void);
CIMGUI_API void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self);
CIMGUI_API void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self,int pos,int bytes_count);
CIMGUI_API void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self,int pos,const char* text,const char* text_end);
CIMGUI_API bool ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self);
CIMGUI_API ImGuiPayload* ImGuiPayload_ImGuiPayload(void);
CIMGUI_API void ImGuiPayload_destroy(ImGuiPayload* self);
CIMGUI_API void ImGuiPayload_Clear(ImGuiPayload* self);
CIMGUI_API bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type);
CIMGUI_API bool ImGuiPayload_IsPreview(ImGuiPayload* self);
CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self);
CIMGUI_API ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(void);
CIMGUI_API void ImGuiOnceUponAFrame_destroy(ImGuiOnceUponAFrame* self);
CIMGUI_API ImGuiTextFilter* ImGuiTextFilter_ImGuiTextFilter(const char* default_filter);
@@ -1240,17 +1258,11 @@ CIMGUI_API float* ImGuiStorage_GetFloatRef(ImGuiStorage* self,ImGuiID key,float
CIMGUI_API void** ImGuiStorage_GetVoidPtrRef(ImGuiStorage* self,ImGuiID key,void* default_val);
CIMGUI_API void ImGuiStorage_SetAllInt(ImGuiStorage* self,int val);
CIMGUI_API void ImGuiStorage_BuildSortByKey(ImGuiStorage* self);
CIMGUI_API ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(void);
CIMGUI_API void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self);
CIMGUI_API void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self,int pos,int bytes_count);
CIMGUI_API void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self,int pos,const char* text,const char* text_end);
CIMGUI_API bool ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self);
CIMGUI_API ImGuiPayload* ImGuiPayload_ImGuiPayload(void);
CIMGUI_API void ImGuiPayload_destroy(ImGuiPayload* self);
CIMGUI_API void ImGuiPayload_Clear(ImGuiPayload* self);
CIMGUI_API bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type);
CIMGUI_API bool ImGuiPayload_IsPreview(ImGuiPayload* self);
CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self);
CIMGUI_API ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count,float items_height);
CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self);
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self);
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height);
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* self);
CIMGUI_API ImColor* ImColor_ImColor(void);
CIMGUI_API void ImColor_destroy(ImColor* self);
CIMGUI_API ImColor* ImColor_ImColorInt(int r,int g,int b,int a);
@@ -1259,11 +1271,6 @@ CIMGUI_API ImColor* ImColor_ImColorFloat(float r,float g,float b,float a);
CIMGUI_API ImColor* ImColor_ImColorVec4(const ImVec4 col);
CIMGUI_API void ImColor_SetHSV(ImColor* self,float h,float s,float v,float a);
CIMGUI_API ImColor ImColor_HSV(ImColor* self,float h,float s,float v,float a);
CIMGUI_API ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count,float items_height);
CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self);
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self);
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height);
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* self);
CIMGUI_API ImDrawCmd* ImDrawCmd_ImDrawCmd(void);
CIMGUI_API void ImDrawCmd_destroy(ImDrawCmd* self);
CIMGUI_API ImDrawList* ImDrawList_ImDrawList(const ImDrawListSharedData* shared_data);
@@ -1444,6 +1451,7 @@ CIMGUI_API ImVector_ImWchar* ImVector_ImWchar_create();
CIMGUI_API void ImVector_ImWchar_destroy(ImVector_ImWchar* p);
CIMGUI_API void ImVector_ImWchar_Init(ImVector_ImWchar* p);
CIMGUI_API void ImVector_ImWchar_UnInit(ImVector_ImWchar* p);
#endif //CIMGUI_INCLUDED

View File

@@ -31,4 +31,4 @@ CIMGUI_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window,void* sdl_gl_con
CIMGUI_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window);
CIMGUI_API void ImGui_ImplSDL2_Shutdown();
CIMGUI_API void ImGui_ImplSDL2_NewFrame(SDL_Window* window);
CIMGUI_API bool ImGui_ImplSDL2_ProcessEvent(SDL_Event* event);
CIMGUI_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event);

File diff suppressed because one or more lines are too long

View File

@@ -11093,6 +11093,24 @@ defs["igSetWindowSize"][2]["signature"] = "(const char*,const ImVec2,ImGuiCond)"
defs["igSetWindowSize"][2]["stname"] = "ImGui"
defs["igSetWindowSize"]["(const ImVec2,ImGuiCond)"] = defs["igSetWindowSize"][1]
defs["igSetWindowSize"]["(const char*,const ImVec2,ImGuiCond)"] = defs["igSetWindowSize"][2]
defs["igShowAboutWindow"] = {}
defs["igShowAboutWindow"][1] = {}
defs["igShowAboutWindow"][1]["args"] = "(bool* p_open)"
defs["igShowAboutWindow"][1]["argsT"] = {}
defs["igShowAboutWindow"][1]["argsT"][1] = {}
defs["igShowAboutWindow"][1]["argsT"][1]["name"] = "p_open"
defs["igShowAboutWindow"][1]["argsT"][1]["type"] = "bool*"
defs["igShowAboutWindow"][1]["argsoriginal"] = "(bool* p_open=((void *)0))"
defs["igShowAboutWindow"][1]["call_args"] = "(p_open)"
defs["igShowAboutWindow"][1]["cimguiname"] = "igShowAboutWindow"
defs["igShowAboutWindow"][1]["comment"] = ""
defs["igShowAboutWindow"][1]["defaults"] = {}
defs["igShowAboutWindow"][1]["defaults"]["p_open"] = "((void *)0)"
defs["igShowAboutWindow"][1]["funcname"] = "ShowAboutWindow"
defs["igShowAboutWindow"][1]["ret"] = "void"
defs["igShowAboutWindow"][1]["signature"] = "(bool*)"
defs["igShowAboutWindow"][1]["stname"] = "ImGui"
defs["igShowAboutWindow"]["(bool*)"] = defs["igShowAboutWindow"][1]
defs["igShowDemoWindow"] = {}
defs["igShowDemoWindow"][1] = {}
defs["igShowDemoWindow"][1]["args"] = "(bool* p_open)"

File diff suppressed because one or more lines are too long

View File

@@ -482,12 +482,12 @@ defs["ImGui_ImplSDL2_NewFrame"][1]["stname"] = ""
defs["ImGui_ImplSDL2_NewFrame"]["(SDL_Window*)"] = defs["ImGui_ImplSDL2_NewFrame"][1]
defs["ImGui_ImplSDL2_ProcessEvent"] = {}
defs["ImGui_ImplSDL2_ProcessEvent"][1] = {}
defs["ImGui_ImplSDL2_ProcessEvent"][1]["args"] = "(SDL_Event* event)"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["args"] = "(const SDL_Event* event)"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["argsT"] = {}
defs["ImGui_ImplSDL2_ProcessEvent"][1]["argsT"][1] = {}
defs["ImGui_ImplSDL2_ProcessEvent"][1]["argsT"][1]["name"] = "event"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["argsT"][1]["type"] = "SDL_Event*"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["argsoriginal"] = "(SDL_Event* event)"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["argsT"][1]["type"] = "const SDL_Event*"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["argsoriginal"] = "(const SDL_Event* event)"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["call_args"] = "(event)"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["cimguiname"] = "ImGui_ImplSDL2_ProcessEvent"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["comment"] = ""
@@ -495,9 +495,9 @@ defs["ImGui_ImplSDL2_ProcessEvent"][1]["defaults"] = {}
defs["ImGui_ImplSDL2_ProcessEvent"][1]["funcname"] = "ImGui_ImplSDL2_ProcessEvent"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["location"] = "imgui_impl_sdl"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["ret"] = "bool"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["signature"] = "(SDL_Event*)"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["signature"] = "(const SDL_Event*)"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["stname"] = ""
defs["ImGui_ImplSDL2_ProcessEvent"]["(SDL_Event*)"] = defs["ImGui_ImplSDL2_ProcessEvent"][1]
defs["ImGui_ImplSDL2_ProcessEvent"]["(const SDL_Event*)"] = defs["ImGui_ImplSDL2_ProcessEvent"][1]
defs["ImGui_ImplSDL2_Shutdown"] = {}
defs["ImGui_ImplSDL2_Shutdown"][1] = {}
defs["ImGui_ImplSDL2_Shutdown"][1]["args"] = "()"

View File

@@ -23,32 +23,43 @@ igRadioButton 2
igSetWindowSize 2
1 void igSetWindowSizeVec2 (const ImVec2,ImGuiCond)
2 void igSetWindowSizeStr (const char*,const ImVec2,ImGuiCond)
igSetWindowFocus 2
1 void igSetWindowFocus ()
2 void igSetWindowFocusStr (const char*)
igSetWindowCollapsed 2
1 void igSetWindowCollapsedBool (bool,ImGuiCond)
2 void igSetWindowCollapsedStr (const char*,bool,ImGuiCond)
igPlotLines 2
1 void igPlotLines (const char*,const float*,int,int,const char*,float,float,ImVec2,int)
2 void igPlotLinesFnPtr (const char*,float(*)(void*,int),void*,int,int,const char*,float,float,ImVec2)
igListBoxHeader 2
1 bool igListBoxHeaderVec2 (const char*,const ImVec2)
2 bool igListBoxHeaderInt (const char*,int,int)
ImVec2_ImVec2 2
1 nil ImVec2_ImVec2 ()
2 nil ImVec2_ImVec2Float (float,float)
igPlotHistogram 2
1 void igPlotHistogramFloatPtr (const char*,const float*,int,int,const char*,float,float,ImVec2,int)
2 void igPlotHistogramFnPtr (const char*,float(*)(void*,int),void*,int,int,const char*,float,float,ImVec2)
igTreeNodeExV 2
1 bool igTreeNodeExVStr (const char*,ImGuiTreeNodeFlags,const char*,va_list)
2 bool igTreeNodeExVPtr (const void*,ImGuiTreeNodeFlags,const char*,va_list)
igPushStyleColor 2
1 void igPushStyleColorU32 (ImGuiCol,ImU32)
2 void igPushStyleColor (ImGuiCol,const ImVec4)
igGetID 3
1 ImGuiID igGetIDStr (const char*)
2 ImGuiID igGetIDRange (const char*,const char*)
3 ImGuiID igGetIDPtr (const void*)
igGetColorU32 3
1 ImU32 igGetColorU32 (ImGuiCol,float)
2 ImU32 igGetColorU32Vec4 (const ImVec4)
3 ImU32 igGetColorU32U32 (ImU32)
TextRange_TextRange 2
1 nil TextRange_TextRange ()
2 nil TextRange_TextRangeStr (const char*,const char*)
igListBoxHeader 2
1 bool igListBoxHeaderVec2 (const char*,const ImVec2)
2 bool igListBoxHeaderInt (const char*,int,int)
igBeginChild 2
1 bool igBeginChild (const char*,const ImVec2,bool,ImGuiWindowFlags)
2 bool igBeginChildID (ImGuiID,const ImVec2,bool,ImGuiWindowFlags)
igTreePush 2
1 void igTreePushStr (const char*)
2 void igTreePushPtr (const void*)
ImDrawList_AddText 2
1 void ImDrawList_AddText (const ImVec2,ImU32,const char*,const char*)
2 void ImDrawList_AddTextFontPtr (const ImFont*,float,const ImVec2,ImU32,const char*,const char*,float,const ImVec4*)
@@ -58,31 +69,18 @@ igSelectable 2
igListBox 2
1 bool igListBoxStr_arr (const char*,int*,const char* const[],int,int)
2 bool igListBoxFnPtr (const char*,int*,bool(*)(void*,int,const char**),void*,int,int)
igSetWindowFocus 2
1 void igSetWindowFocus ()
2 void igSetWindowFocusStr (const char*)
igPushID 4
1 void igPushIDStr (const char*)
2 void igPushIDRange (const char*,const char*)
3 void igPushIDPtr (const void*)
4 void igPushIDInt (int)
igTreeNodeEx 3
1 bool igTreeNodeExStr (const char*,ImGuiTreeNodeFlags)
2 bool igTreeNodeExStrStr (const char*,ImGuiTreeNodeFlags,const char*,...)
3 bool igTreeNodeExPtr (const void*,ImGuiTreeNodeFlags,const char*,...)
Pair_Pair 3
1 nil Pair_PairInt (ImGuiID,int)
2 nil Pair_PairFloat (ImGuiID,float)
3 nil Pair_PairPtr (ImGuiID,void*)
igTreePush 2
1 void igTreePushStr (const char*)
2 void igTreePushPtr (const void*)
TextRange_TextRange 2
1 nil TextRange_TextRange ()
2 nil TextRange_TextRangeStr (const char*,const char*)
igPushStyleColor 2
1 void igPushStyleColorU32 (ImGuiCol,ImU32)
2 void igPushStyleColor (ImGuiCol,const ImVec4)
igSetWindowPos 2
1 void igSetWindowPosVec2 (const ImVec2,ImGuiCond)
2 void igSetWindowPosStr (const char*,const ImVec2,ImGuiCond)
ImColor_ImColor 5
1 nil ImColor_ImColor ()
2 nil ImColor_ImColorInt (int,int,int,int)
@@ -95,12 +93,14 @@ igCollapsingHeader 2
igMenuItem 2
1 bool igMenuItemBool (const char*,const char*,bool,bool)
2 bool igMenuItemBoolPtr (const char*,const char*,bool*,bool)
igSetWindowPos 2
1 void igSetWindowPosVec2 (const ImVec2,ImGuiCond)
2 void igSetWindowPosStr (const char*,const ImVec2,ImGuiCond)
ImVec2_ImVec2 2
1 nil ImVec2_ImVec2 ()
2 nil ImVec2_ImVec2Float (float,float)
igTreeNodeEx 3
1 bool igTreeNodeExStr (const char*,ImGuiTreeNodeFlags)
2 bool igTreeNodeExStrStr (const char*,ImGuiTreeNodeFlags,const char*,...)
3 bool igTreeNodeExPtr (const void*,ImGuiTreeNodeFlags,const char*,...)
igGetColorU32 3
1 ImU32 igGetColorU32 (ImGuiCol,float)
2 ImU32 igGetColorU32Vec4 (const ImVec4)
3 ImU32 igGetColorU32U32 (ImU32)
igTreeNode 3
1 bool igTreeNodeStr (const char*)
2 bool igTreeNodeStrStr (const char*,const char*,...)

File diff suppressed because one or more lines are too long

View File

@@ -39,13 +39,17 @@ defs["enums"]["ImDrawCornerFlags_"][9]["name"] = "ImDrawCornerFlags_All"
defs["enums"]["ImDrawCornerFlags_"][9]["value"] = "0xF"
defs["enums"]["ImDrawListFlags_"] = {}
defs["enums"]["ImDrawListFlags_"][1] = {}
defs["enums"]["ImDrawListFlags_"][1]["calc_value"] = 1
defs["enums"]["ImDrawListFlags_"][1]["name"] = "ImDrawListFlags_AntiAliasedLines"
defs["enums"]["ImDrawListFlags_"][1]["value"] = "1 << 0"
defs["enums"]["ImDrawListFlags_"][1]["calc_value"] = 0
defs["enums"]["ImDrawListFlags_"][1]["name"] = "ImDrawListFlags_None"
defs["enums"]["ImDrawListFlags_"][1]["value"] = "0"
defs["enums"]["ImDrawListFlags_"][2] = {}
defs["enums"]["ImDrawListFlags_"][2]["calc_value"] = 2
defs["enums"]["ImDrawListFlags_"][2]["name"] = "ImDrawListFlags_AntiAliasedFill"
defs["enums"]["ImDrawListFlags_"][2]["value"] = "1 << 1"
defs["enums"]["ImDrawListFlags_"][2]["calc_value"] = 1
defs["enums"]["ImDrawListFlags_"][2]["name"] = "ImDrawListFlags_AntiAliasedLines"
defs["enums"]["ImDrawListFlags_"][2]["value"] = "1 << 0"
defs["enums"]["ImDrawListFlags_"][3] = {}
defs["enums"]["ImDrawListFlags_"][3]["calc_value"] = 2
defs["enums"]["ImDrawListFlags_"][3]["name"] = "ImDrawListFlags_AntiAliasedFill"
defs["enums"]["ImDrawListFlags_"][3]["value"] = "1 << 1"
defs["enums"]["ImFontAtlasFlags_"] = {}
defs["enums"]["ImFontAtlasFlags_"][1] = {}
defs["enums"]["ImFontAtlasFlags_"][1]["calc_value"] = 0
@@ -61,17 +65,21 @@ defs["enums"]["ImFontAtlasFlags_"][3]["name"] = "ImFontAtlasFlags_NoMouseCursors
defs["enums"]["ImFontAtlasFlags_"][3]["value"] = "1 << 1"
defs["enums"]["ImGuiBackendFlags_"] = {}
defs["enums"]["ImGuiBackendFlags_"][1] = {}
defs["enums"]["ImGuiBackendFlags_"][1]["calc_value"] = 1
defs["enums"]["ImGuiBackendFlags_"][1]["name"] = "ImGuiBackendFlags_HasGamepad"
defs["enums"]["ImGuiBackendFlags_"][1]["value"] = "1 << 0"
defs["enums"]["ImGuiBackendFlags_"][1]["calc_value"] = 0
defs["enums"]["ImGuiBackendFlags_"][1]["name"] = "ImGuiBackendFlags_None"
defs["enums"]["ImGuiBackendFlags_"][1]["value"] = "0"
defs["enums"]["ImGuiBackendFlags_"][2] = {}
defs["enums"]["ImGuiBackendFlags_"][2]["calc_value"] = 2
defs["enums"]["ImGuiBackendFlags_"][2]["name"] = "ImGuiBackendFlags_HasMouseCursors"
defs["enums"]["ImGuiBackendFlags_"][2]["value"] = "1 << 1"
defs["enums"]["ImGuiBackendFlags_"][2]["calc_value"] = 1
defs["enums"]["ImGuiBackendFlags_"][2]["name"] = "ImGuiBackendFlags_HasGamepad"
defs["enums"]["ImGuiBackendFlags_"][2]["value"] = "1 << 0"
defs["enums"]["ImGuiBackendFlags_"][3] = {}
defs["enums"]["ImGuiBackendFlags_"][3]["calc_value"] = 4
defs["enums"]["ImGuiBackendFlags_"][3]["name"] = "ImGuiBackendFlags_HasSetMousePos"
defs["enums"]["ImGuiBackendFlags_"][3]["value"] = "1 << 2"
defs["enums"]["ImGuiBackendFlags_"][3]["calc_value"] = 2
defs["enums"]["ImGuiBackendFlags_"][3]["name"] = "ImGuiBackendFlags_HasMouseCursors"
defs["enums"]["ImGuiBackendFlags_"][3]["value"] = "1 << 1"
defs["enums"]["ImGuiBackendFlags_"][4] = {}
defs["enums"]["ImGuiBackendFlags_"][4]["calc_value"] = 4
defs["enums"]["ImGuiBackendFlags_"][4]["name"] = "ImGuiBackendFlags_HasSetMousePos"
defs["enums"]["ImGuiBackendFlags_"][4]["value"] = "1 << 2"
defs["enums"]["ImGuiCol_"] = {}
defs["enums"]["ImGuiCol_"][1] = {}
defs["enums"]["ImGuiCol_"][1]["calc_value"] = 0
@@ -406,37 +414,41 @@ defs["enums"]["ImGuiCond_"][4]["name"] = "ImGuiCond_Appearing"
defs["enums"]["ImGuiCond_"][4]["value"] = "1 << 3"
defs["enums"]["ImGuiConfigFlags_"] = {}
defs["enums"]["ImGuiConfigFlags_"][1] = {}
defs["enums"]["ImGuiConfigFlags_"][1]["calc_value"] = 1
defs["enums"]["ImGuiConfigFlags_"][1]["name"] = "ImGuiConfigFlags_NavEnableKeyboard"
defs["enums"]["ImGuiConfigFlags_"][1]["value"] = "1 << 0"
defs["enums"]["ImGuiConfigFlags_"][1]["calc_value"] = 0
defs["enums"]["ImGuiConfigFlags_"][1]["name"] = "ImGuiConfigFlags_None"
defs["enums"]["ImGuiConfigFlags_"][1]["value"] = "0"
defs["enums"]["ImGuiConfigFlags_"][2] = {}
defs["enums"]["ImGuiConfigFlags_"][2]["calc_value"] = 2
defs["enums"]["ImGuiConfigFlags_"][2]["name"] = "ImGuiConfigFlags_NavEnableGamepad"
defs["enums"]["ImGuiConfigFlags_"][2]["value"] = "1 << 1"
defs["enums"]["ImGuiConfigFlags_"][2]["calc_value"] = 1
defs["enums"]["ImGuiConfigFlags_"][2]["name"] = "ImGuiConfigFlags_NavEnableKeyboard"
defs["enums"]["ImGuiConfigFlags_"][2]["value"] = "1 << 0"
defs["enums"]["ImGuiConfigFlags_"][3] = {}
defs["enums"]["ImGuiConfigFlags_"][3]["calc_value"] = 4
defs["enums"]["ImGuiConfigFlags_"][3]["name"] = "ImGuiConfigFlags_NavEnableSetMousePos"
defs["enums"]["ImGuiConfigFlags_"][3]["value"] = "1 << 2"
defs["enums"]["ImGuiConfigFlags_"][3]["calc_value"] = 2
defs["enums"]["ImGuiConfigFlags_"][3]["name"] = "ImGuiConfigFlags_NavEnableGamepad"
defs["enums"]["ImGuiConfigFlags_"][3]["value"] = "1 << 1"
defs["enums"]["ImGuiConfigFlags_"][4] = {}
defs["enums"]["ImGuiConfigFlags_"][4]["calc_value"] = 8
defs["enums"]["ImGuiConfigFlags_"][4]["name"] = "ImGuiConfigFlags_NavNoCaptureKeyboard"
defs["enums"]["ImGuiConfigFlags_"][4]["value"] = "1 << 3"
defs["enums"]["ImGuiConfigFlags_"][4]["calc_value"] = 4
defs["enums"]["ImGuiConfigFlags_"][4]["name"] = "ImGuiConfigFlags_NavEnableSetMousePos"
defs["enums"]["ImGuiConfigFlags_"][4]["value"] = "1 << 2"
defs["enums"]["ImGuiConfigFlags_"][5] = {}
defs["enums"]["ImGuiConfigFlags_"][5]["calc_value"] = 16
defs["enums"]["ImGuiConfigFlags_"][5]["name"] = "ImGuiConfigFlags_NoMouse"
defs["enums"]["ImGuiConfigFlags_"][5]["value"] = "1 << 4"
defs["enums"]["ImGuiConfigFlags_"][5]["calc_value"] = 8
defs["enums"]["ImGuiConfigFlags_"][5]["name"] = "ImGuiConfigFlags_NavNoCaptureKeyboard"
defs["enums"]["ImGuiConfigFlags_"][5]["value"] = "1 << 3"
defs["enums"]["ImGuiConfigFlags_"][6] = {}
defs["enums"]["ImGuiConfigFlags_"][6]["calc_value"] = 32
defs["enums"]["ImGuiConfigFlags_"][6]["name"] = "ImGuiConfigFlags_NoMouseCursorChange"
defs["enums"]["ImGuiConfigFlags_"][6]["value"] = "1 << 5"
defs["enums"]["ImGuiConfigFlags_"][6]["calc_value"] = 16
defs["enums"]["ImGuiConfigFlags_"][6]["name"] = "ImGuiConfigFlags_NoMouse"
defs["enums"]["ImGuiConfigFlags_"][6]["value"] = "1 << 4"
defs["enums"]["ImGuiConfigFlags_"][7] = {}
defs["enums"]["ImGuiConfigFlags_"][7]["calc_value"] = 1048576
defs["enums"]["ImGuiConfigFlags_"][7]["name"] = "ImGuiConfigFlags_IsSRGB"
defs["enums"]["ImGuiConfigFlags_"][7]["value"] = "1 << 20"
defs["enums"]["ImGuiConfigFlags_"][7]["calc_value"] = 32
defs["enums"]["ImGuiConfigFlags_"][7]["name"] = "ImGuiConfigFlags_NoMouseCursorChange"
defs["enums"]["ImGuiConfigFlags_"][7]["value"] = "1 << 5"
defs["enums"]["ImGuiConfigFlags_"][8] = {}
defs["enums"]["ImGuiConfigFlags_"][8]["calc_value"] = 2097152
defs["enums"]["ImGuiConfigFlags_"][8]["name"] = "ImGuiConfigFlags_IsTouchScreen"
defs["enums"]["ImGuiConfigFlags_"][8]["value"] = "1 << 21"
defs["enums"]["ImGuiConfigFlags_"][8]["calc_value"] = 1048576
defs["enums"]["ImGuiConfigFlags_"][8]["name"] = "ImGuiConfigFlags_IsSRGB"
defs["enums"]["ImGuiConfigFlags_"][8]["value"] = "1 << 20"
defs["enums"]["ImGuiConfigFlags_"][9] = {}
defs["enums"]["ImGuiConfigFlags_"][9]["calc_value"] = 2097152
defs["enums"]["ImGuiConfigFlags_"][9]["name"] = "ImGuiConfigFlags_IsTouchScreen"
defs["enums"]["ImGuiConfigFlags_"][9]["value"] = "1 << 21"
defs["enums"]["ImGuiDataType_"] = {}
defs["enums"]["ImGuiDataType_"][1] = {}
defs["enums"]["ImGuiDataType_"][1]["calc_value"] = 0
@@ -1602,161 +1614,167 @@ defs["structs"]["ImGuiIO"][25] = {}
defs["structs"]["ImGuiIO"][25]["name"] = "ConfigResizeWindowsFromEdges"
defs["structs"]["ImGuiIO"][25]["type"] = "bool"
defs["structs"]["ImGuiIO"][26] = {}
defs["structs"]["ImGuiIO"][26]["name"] = "GetClipboardTextFn"
defs["structs"]["ImGuiIO"][26]["type"] = "const char*(*)(void* user_data)"
defs["structs"]["ImGuiIO"][26]["name"] = "BackendPlatformName"
defs["structs"]["ImGuiIO"][26]["type"] = "const char*"
defs["structs"]["ImGuiIO"][27] = {}
defs["structs"]["ImGuiIO"][27]["name"] = "SetClipboardTextFn"
defs["structs"]["ImGuiIO"][27]["type"] = "void(*)(void* user_data,const char* text)"
defs["structs"]["ImGuiIO"][27]["name"] = "BackendRendererName"
defs["structs"]["ImGuiIO"][27]["type"] = "const char*"
defs["structs"]["ImGuiIO"][28] = {}
defs["structs"]["ImGuiIO"][28]["name"] = "ClipboardUserData"
defs["structs"]["ImGuiIO"][28]["type"] = "void*"
defs["structs"]["ImGuiIO"][28]["name"] = "GetClipboardTextFn"
defs["structs"]["ImGuiIO"][28]["type"] = "const char*(*)(void* user_data)"
defs["structs"]["ImGuiIO"][29] = {}
defs["structs"]["ImGuiIO"][29]["name"] = "ImeSetInputScreenPosFn"
defs["structs"]["ImGuiIO"][29]["type"] = "void(*)(int x,int y)"
defs["structs"]["ImGuiIO"][29]["name"] = "SetClipboardTextFn"
defs["structs"]["ImGuiIO"][29]["type"] = "void(*)(void* user_data,const char* text)"
defs["structs"]["ImGuiIO"][30] = {}
defs["structs"]["ImGuiIO"][30]["name"] = "ImeWindowHandle"
defs["structs"]["ImGuiIO"][30]["name"] = "ClipboardUserData"
defs["structs"]["ImGuiIO"][30]["type"] = "void*"
defs["structs"]["ImGuiIO"][31] = {}
defs["structs"]["ImGuiIO"][31]["name"] = "RenderDrawListsFnUnused"
defs["structs"]["ImGuiIO"][31]["type"] = "void*"
defs["structs"]["ImGuiIO"][31]["name"] = "ImeSetInputScreenPosFn"
defs["structs"]["ImGuiIO"][31]["type"] = "void(*)(int x,int y)"
defs["structs"]["ImGuiIO"][32] = {}
defs["structs"]["ImGuiIO"][32]["name"] = "MousePos"
defs["structs"]["ImGuiIO"][32]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][32]["name"] = "ImeWindowHandle"
defs["structs"]["ImGuiIO"][32]["type"] = "void*"
defs["structs"]["ImGuiIO"][33] = {}
defs["structs"]["ImGuiIO"][33]["name"] = "MouseDown[5]"
defs["structs"]["ImGuiIO"][33]["size"] = 5
defs["structs"]["ImGuiIO"][33]["type"] = "bool"
defs["structs"]["ImGuiIO"][33]["name"] = "RenderDrawListsFnUnused"
defs["structs"]["ImGuiIO"][33]["type"] = "void*"
defs["structs"]["ImGuiIO"][34] = {}
defs["structs"]["ImGuiIO"][34]["name"] = "MouseWheel"
defs["structs"]["ImGuiIO"][34]["type"] = "float"
defs["structs"]["ImGuiIO"][34]["name"] = "MousePos"
defs["structs"]["ImGuiIO"][34]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][35] = {}
defs["structs"]["ImGuiIO"][35]["name"] = "MouseWheelH"
defs["structs"]["ImGuiIO"][35]["type"] = "float"
defs["structs"]["ImGuiIO"][35]["name"] = "MouseDown[5]"
defs["structs"]["ImGuiIO"][35]["size"] = 5
defs["structs"]["ImGuiIO"][35]["type"] = "bool"
defs["structs"]["ImGuiIO"][36] = {}
defs["structs"]["ImGuiIO"][36]["name"] = "KeyCtrl"
defs["structs"]["ImGuiIO"][36]["type"] = "bool"
defs["structs"]["ImGuiIO"][36]["name"] = "MouseWheel"
defs["structs"]["ImGuiIO"][36]["type"] = "float"
defs["structs"]["ImGuiIO"][37] = {}
defs["structs"]["ImGuiIO"][37]["name"] = "KeyShift"
defs["structs"]["ImGuiIO"][37]["type"] = "bool"
defs["structs"]["ImGuiIO"][37]["name"] = "MouseWheelH"
defs["structs"]["ImGuiIO"][37]["type"] = "float"
defs["structs"]["ImGuiIO"][38] = {}
defs["structs"]["ImGuiIO"][38]["name"] = "KeyAlt"
defs["structs"]["ImGuiIO"][38]["name"] = "KeyCtrl"
defs["structs"]["ImGuiIO"][38]["type"] = "bool"
defs["structs"]["ImGuiIO"][39] = {}
defs["structs"]["ImGuiIO"][39]["name"] = "KeySuper"
defs["structs"]["ImGuiIO"][39]["name"] = "KeyShift"
defs["structs"]["ImGuiIO"][39]["type"] = "bool"
defs["structs"]["ImGuiIO"][40] = {}
defs["structs"]["ImGuiIO"][40]["name"] = "KeysDown[512]"
defs["structs"]["ImGuiIO"][40]["size"] = 512
defs["structs"]["ImGuiIO"][40]["name"] = "KeyAlt"
defs["structs"]["ImGuiIO"][40]["type"] = "bool"
defs["structs"]["ImGuiIO"][41] = {}
defs["structs"]["ImGuiIO"][41]["name"] = "InputCharacters[16+1]"
defs["structs"]["ImGuiIO"][41]["size"] = 17
defs["structs"]["ImGuiIO"][41]["type"] = "ImWchar"
defs["structs"]["ImGuiIO"][41]["name"] = "KeySuper"
defs["structs"]["ImGuiIO"][41]["type"] = "bool"
defs["structs"]["ImGuiIO"][42] = {}
defs["structs"]["ImGuiIO"][42]["name"] = "NavInputs[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][42]["size"] = 21
defs["structs"]["ImGuiIO"][42]["type"] = "float"
defs["structs"]["ImGuiIO"][42]["name"] = "KeysDown[512]"
defs["structs"]["ImGuiIO"][42]["size"] = 512
defs["structs"]["ImGuiIO"][42]["type"] = "bool"
defs["structs"]["ImGuiIO"][43] = {}
defs["structs"]["ImGuiIO"][43]["name"] = "WantCaptureMouse"
defs["structs"]["ImGuiIO"][43]["type"] = "bool"
defs["structs"]["ImGuiIO"][43]["name"] = "InputCharacters[16+1]"
defs["structs"]["ImGuiIO"][43]["size"] = 17
defs["structs"]["ImGuiIO"][43]["type"] = "ImWchar"
defs["structs"]["ImGuiIO"][44] = {}
defs["structs"]["ImGuiIO"][44]["name"] = "WantCaptureKeyboard"
defs["structs"]["ImGuiIO"][44]["type"] = "bool"
defs["structs"]["ImGuiIO"][44]["name"] = "NavInputs[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][44]["size"] = 21
defs["structs"]["ImGuiIO"][44]["type"] = "float"
defs["structs"]["ImGuiIO"][45] = {}
defs["structs"]["ImGuiIO"][45]["name"] = "WantTextInput"
defs["structs"]["ImGuiIO"][45]["name"] = "WantCaptureMouse"
defs["structs"]["ImGuiIO"][45]["type"] = "bool"
defs["structs"]["ImGuiIO"][46] = {}
defs["structs"]["ImGuiIO"][46]["name"] = "WantSetMousePos"
defs["structs"]["ImGuiIO"][46]["name"] = "WantCaptureKeyboard"
defs["structs"]["ImGuiIO"][46]["type"] = "bool"
defs["structs"]["ImGuiIO"][47] = {}
defs["structs"]["ImGuiIO"][47]["name"] = "WantSaveIniSettings"
defs["structs"]["ImGuiIO"][47]["name"] = "WantTextInput"
defs["structs"]["ImGuiIO"][47]["type"] = "bool"
defs["structs"]["ImGuiIO"][48] = {}
defs["structs"]["ImGuiIO"][48]["name"] = "NavActive"
defs["structs"]["ImGuiIO"][48]["name"] = "WantSetMousePos"
defs["structs"]["ImGuiIO"][48]["type"] = "bool"
defs["structs"]["ImGuiIO"][49] = {}
defs["structs"]["ImGuiIO"][49]["name"] = "NavVisible"
defs["structs"]["ImGuiIO"][49]["name"] = "WantSaveIniSettings"
defs["structs"]["ImGuiIO"][49]["type"] = "bool"
defs["structs"]["ImGuiIO"][50] = {}
defs["structs"]["ImGuiIO"][50]["name"] = "Framerate"
defs["structs"]["ImGuiIO"][50]["type"] = "float"
defs["structs"]["ImGuiIO"][50]["name"] = "NavActive"
defs["structs"]["ImGuiIO"][50]["type"] = "bool"
defs["structs"]["ImGuiIO"][51] = {}
defs["structs"]["ImGuiIO"][51]["name"] = "MetricsRenderVertices"
defs["structs"]["ImGuiIO"][51]["type"] = "int"
defs["structs"]["ImGuiIO"][51]["name"] = "NavVisible"
defs["structs"]["ImGuiIO"][51]["type"] = "bool"
defs["structs"]["ImGuiIO"][52] = {}
defs["structs"]["ImGuiIO"][52]["name"] = "MetricsRenderIndices"
defs["structs"]["ImGuiIO"][52]["type"] = "int"
defs["structs"]["ImGuiIO"][52]["name"] = "Framerate"
defs["structs"]["ImGuiIO"][52]["type"] = "float"
defs["structs"]["ImGuiIO"][53] = {}
defs["structs"]["ImGuiIO"][53]["name"] = "MetricsRenderWindows"
defs["structs"]["ImGuiIO"][53]["name"] = "MetricsRenderVertices"
defs["structs"]["ImGuiIO"][53]["type"] = "int"
defs["structs"]["ImGuiIO"][54] = {}
defs["structs"]["ImGuiIO"][54]["name"] = "MetricsActiveWindows"
defs["structs"]["ImGuiIO"][54]["name"] = "MetricsRenderIndices"
defs["structs"]["ImGuiIO"][54]["type"] = "int"
defs["structs"]["ImGuiIO"][55] = {}
defs["structs"]["ImGuiIO"][55]["name"] = "MetricsActiveAllocations"
defs["structs"]["ImGuiIO"][55]["name"] = "MetricsRenderWindows"
defs["structs"]["ImGuiIO"][55]["type"] = "int"
defs["structs"]["ImGuiIO"][56] = {}
defs["structs"]["ImGuiIO"][56]["name"] = "MouseDelta"
defs["structs"]["ImGuiIO"][56]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][56]["name"] = "MetricsActiveWindows"
defs["structs"]["ImGuiIO"][56]["type"] = "int"
defs["structs"]["ImGuiIO"][57] = {}
defs["structs"]["ImGuiIO"][57]["name"] = "MousePosPrev"
defs["structs"]["ImGuiIO"][57]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][57]["name"] = "MetricsActiveAllocations"
defs["structs"]["ImGuiIO"][57]["type"] = "int"
defs["structs"]["ImGuiIO"][58] = {}
defs["structs"]["ImGuiIO"][58]["name"] = "MouseClickedPos[5]"
defs["structs"]["ImGuiIO"][58]["size"] = 5
defs["structs"]["ImGuiIO"][58]["name"] = "MouseDelta"
defs["structs"]["ImGuiIO"][58]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][59] = {}
defs["structs"]["ImGuiIO"][59]["name"] = "MouseClickedTime[5]"
defs["structs"]["ImGuiIO"][59]["size"] = 5
defs["structs"]["ImGuiIO"][59]["type"] = "double"
defs["structs"]["ImGuiIO"][59]["name"] = "MousePosPrev"
defs["structs"]["ImGuiIO"][59]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][60] = {}
defs["structs"]["ImGuiIO"][60]["name"] = "MouseClicked[5]"
defs["structs"]["ImGuiIO"][60]["name"] = "MouseClickedPos[5]"
defs["structs"]["ImGuiIO"][60]["size"] = 5
defs["structs"]["ImGuiIO"][60]["type"] = "bool"
defs["structs"]["ImGuiIO"][60]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][61] = {}
defs["structs"]["ImGuiIO"][61]["name"] = "MouseDoubleClicked[5]"
defs["structs"]["ImGuiIO"][61]["name"] = "MouseClickedTime[5]"
defs["structs"]["ImGuiIO"][61]["size"] = 5
defs["structs"]["ImGuiIO"][61]["type"] = "bool"
defs["structs"]["ImGuiIO"][61]["type"] = "double"
defs["structs"]["ImGuiIO"][62] = {}
defs["structs"]["ImGuiIO"][62]["name"] = "MouseReleased[5]"
defs["structs"]["ImGuiIO"][62]["name"] = "MouseClicked[5]"
defs["structs"]["ImGuiIO"][62]["size"] = 5
defs["structs"]["ImGuiIO"][62]["type"] = "bool"
defs["structs"]["ImGuiIO"][63] = {}
defs["structs"]["ImGuiIO"][63]["name"] = "MouseDownOwned[5]"
defs["structs"]["ImGuiIO"][63]["name"] = "MouseDoubleClicked[5]"
defs["structs"]["ImGuiIO"][63]["size"] = 5
defs["structs"]["ImGuiIO"][63]["type"] = "bool"
defs["structs"]["ImGuiIO"][64] = {}
defs["structs"]["ImGuiIO"][64]["name"] = "MouseDownDuration[5]"
defs["structs"]["ImGuiIO"][64]["name"] = "MouseReleased[5]"
defs["structs"]["ImGuiIO"][64]["size"] = 5
defs["structs"]["ImGuiIO"][64]["type"] = "float"
defs["structs"]["ImGuiIO"][64]["type"] = "bool"
defs["structs"]["ImGuiIO"][65] = {}
defs["structs"]["ImGuiIO"][65]["name"] = "MouseDownDurationPrev[5]"
defs["structs"]["ImGuiIO"][65]["name"] = "MouseDownOwned[5]"
defs["structs"]["ImGuiIO"][65]["size"] = 5
defs["structs"]["ImGuiIO"][65]["type"] = "float"
defs["structs"]["ImGuiIO"][65]["type"] = "bool"
defs["structs"]["ImGuiIO"][66] = {}
defs["structs"]["ImGuiIO"][66]["name"] = "MouseDragMaxDistanceAbs[5]"
defs["structs"]["ImGuiIO"][66]["name"] = "MouseDownDuration[5]"
defs["structs"]["ImGuiIO"][66]["size"] = 5
defs["structs"]["ImGuiIO"][66]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][66]["type"] = "float"
defs["structs"]["ImGuiIO"][67] = {}
defs["structs"]["ImGuiIO"][67]["name"] = "MouseDragMaxDistanceSqr[5]"
defs["structs"]["ImGuiIO"][67]["name"] = "MouseDownDurationPrev[5]"
defs["structs"]["ImGuiIO"][67]["size"] = 5
defs["structs"]["ImGuiIO"][67]["type"] = "float"
defs["structs"]["ImGuiIO"][68] = {}
defs["structs"]["ImGuiIO"][68]["name"] = "KeysDownDuration[512]"
defs["structs"]["ImGuiIO"][68]["size"] = 512
defs["structs"]["ImGuiIO"][68]["type"] = "float"
defs["structs"]["ImGuiIO"][68]["name"] = "MouseDragMaxDistanceAbs[5]"
defs["structs"]["ImGuiIO"][68]["size"] = 5
defs["structs"]["ImGuiIO"][68]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][69] = {}
defs["structs"]["ImGuiIO"][69]["name"] = "KeysDownDurationPrev[512]"
defs["structs"]["ImGuiIO"][69]["size"] = 512
defs["structs"]["ImGuiIO"][69]["name"] = "MouseDragMaxDistanceSqr[5]"
defs["structs"]["ImGuiIO"][69]["size"] = 5
defs["structs"]["ImGuiIO"][69]["type"] = "float"
defs["structs"]["ImGuiIO"][70] = {}
defs["structs"]["ImGuiIO"][70]["name"] = "NavInputsDownDuration[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][70]["size"] = 21
defs["structs"]["ImGuiIO"][70]["name"] = "KeysDownDuration[512]"
defs["structs"]["ImGuiIO"][70]["size"] = 512
defs["structs"]["ImGuiIO"][70]["type"] = "float"
defs["structs"]["ImGuiIO"][71] = {}
defs["structs"]["ImGuiIO"][71]["name"] = "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][71]["size"] = 21
defs["structs"]["ImGuiIO"][71]["name"] = "KeysDownDurationPrev[512]"
defs["structs"]["ImGuiIO"][71]["size"] = 512
defs["structs"]["ImGuiIO"][71]["type"] = "float"
defs["structs"]["ImGuiIO"][72] = {}
defs["structs"]["ImGuiIO"][72]["name"] = "NavInputsDownDuration[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][72]["size"] = 21
defs["structs"]["ImGuiIO"][72]["type"] = "float"
defs["structs"]["ImGuiIO"][73] = {}
defs["structs"]["ImGuiIO"][73]["name"] = "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][73]["size"] = 21
defs["structs"]["ImGuiIO"][73]["type"] = "float"
defs["structs"]["ImGuiInputTextCallbackData"] = {}
defs["structs"]["ImGuiInputTextCallbackData"][1] = {}
defs["structs"]["ImGuiInputTextCallbackData"][1]["name"] = "EventFlag"
@@ -1958,10 +1976,6 @@ defs["structs"]["ImGuiTextBuffer"][1] = {}
defs["structs"]["ImGuiTextBuffer"][1]["name"] = "Buf"
defs["structs"]["ImGuiTextBuffer"][1]["template_type"] = "char"
defs["structs"]["ImGuiTextBuffer"][1]["type"] = "ImVector_char"
defs["structs"]["ImGuiTextBuffer"][2] = {}
defs["structs"]["ImGuiTextBuffer"][2]["name"] = "EmptyString[1]"
defs["structs"]["ImGuiTextBuffer"][2]["size"] = 1
defs["structs"]["ImGuiTextBuffer"][2]["type"] = "char"
defs["structs"]["ImGuiTextFilter"] = {}
defs["structs"]["ImGuiTextFilter"][1] = {}
defs["structs"]["ImGuiTextFilter"][1]["name"] = "InputBuf[256]"

View File

@@ -1 +1,67 @@
{"ImGuiColumnsFlags":"int","ImFontConfig":"struct ImFontConfig","ImS32":"signed int","ImGuiTreeNodeFlags":"int","ImGuiFocusedFlags":"int","ImGuiHoveredFlags":"int","ImU64":"uint64_t","ImGuiID":"unsigned int","ImGuiStyle":"struct ImGuiStyle","ImDrawData":"struct ImDrawData","ImDrawListFlags":"int","ImGuiBackendFlags":"int","ImGuiMouseCursor":"int","ImDrawListSharedData":"struct ImDrawListSharedData","ImGuiStyleVar":"int","ImGuiDir":"int","ImFontAtlas":"struct ImFontAtlas","ImGuiCol":"int","ImGuiOnceUponAFrame":"struct ImGuiOnceUponAFrame","value_type":"T","iterator":"value_type*","ImGuiTextFilter":"struct ImGuiTextFilter","ImDrawIdx":"unsigned short","ImGuiComboFlags":"int","ImDrawCornerFlags":"int","ImWchar":"unsigned short","const_iterator":"const value_type*","ImDrawVert":"struct ImDrawVert","GlyphRangesBuilder":"struct GlyphRangesBuilder","ImVec4":"struct ImVec4","ImGuiSizeCallback":"void(*)(ImGuiSizeCallbackData* data);","ImGuiConfigFlags":"int","ImGuiTextBuffer":"struct ImGuiTextBuffer","ImGuiContext":"struct ImGuiContext","ImColor":"struct ImColor","ImGuiInputTextCallback":"int(*)(ImGuiInputTextCallbackData *data);","ImVec2":"struct ImVec2","ImFontGlyph":"struct ImFontGlyph","ImGuiWindowFlags":"int","Pair":"struct Pair","ImGuiKey":"int","ImGuiInputTextFlags":"int","ImGuiListClipper":"struct ImGuiListClipper","ImGuiDataType":"int","ImDrawChannel":"struct ImDrawChannel","ImGuiIO":"struct ImGuiIO","ImGuiStorage":"struct ImGuiStorage","ImGuiCond":"int","ImU32":"unsigned int","ImGuiNavInput":"int","ImGuiColorEditFlags":"int","ImFont":"struct ImFont","ImGuiSelectableFlags":"int","ImDrawCallback":"void(*)(const ImDrawList* parent_list,const ImDrawCmd* cmd);","ImTextureID":"void*","ImDrawList":"struct ImDrawList","TextRange":"struct TextRange","CustomRect":"struct CustomRect","ImFontAtlasFlags":"int","ImGuiInputTextCallbackData":"struct ImGuiInputTextCallbackData","ImDrawCmd":"struct ImDrawCmd","ImGuiSizeCallbackData":"struct ImGuiSizeCallbackData","ImS64":"int64_t","ImGuiDragDropFlags":"int","ImGuiPayload":"struct ImGuiPayload"}
{
"CustomRect": "struct CustomRect",
"GlyphRangesBuilder": "struct GlyphRangesBuilder",
"ImColor": "struct ImColor",
"ImDrawCallback": "void(*)(const ImDrawList* parent_list,const ImDrawCmd* cmd);",
"ImDrawChannel": "struct ImDrawChannel",
"ImDrawCmd": "struct ImDrawCmd",
"ImDrawCornerFlags": "int",
"ImDrawData": "struct ImDrawData",
"ImDrawIdx": "unsigned short",
"ImDrawList": "struct ImDrawList",
"ImDrawListFlags": "int",
"ImDrawListSharedData": "struct ImDrawListSharedData",
"ImDrawVert": "struct ImDrawVert",
"ImFont": "struct ImFont",
"ImFontAtlas": "struct ImFontAtlas",
"ImFontAtlasFlags": "int",
"ImFontConfig": "struct ImFontConfig",
"ImFontGlyph": "struct ImFontGlyph",
"ImGuiBackendFlags": "int",
"ImGuiCol": "int",
"ImGuiColorEditFlags": "int",
"ImGuiColumnsFlags": "int",
"ImGuiComboFlags": "int",
"ImGuiCond": "int",
"ImGuiConfigFlags": "int",
"ImGuiContext": "struct ImGuiContext",
"ImGuiDataType": "int",
"ImGuiDir": "int",
"ImGuiDragDropFlags": "int",
"ImGuiFocusedFlags": "int",
"ImGuiHoveredFlags": "int",
"ImGuiID": "unsigned int",
"ImGuiIO": "struct ImGuiIO",
"ImGuiInputTextCallback": "int(*)(ImGuiInputTextCallbackData *data);",
"ImGuiInputTextCallbackData": "struct ImGuiInputTextCallbackData",
"ImGuiInputTextFlags": "int",
"ImGuiKey": "int",
"ImGuiListClipper": "struct ImGuiListClipper",
"ImGuiMouseCursor": "int",
"ImGuiNavInput": "int",
"ImGuiOnceUponAFrame": "struct ImGuiOnceUponAFrame",
"ImGuiPayload": "struct ImGuiPayload",
"ImGuiSelectableFlags": "int",
"ImGuiSizeCallback": "void(*)(ImGuiSizeCallbackData* data);",
"ImGuiSizeCallbackData": "struct ImGuiSizeCallbackData",
"ImGuiStorage": "struct ImGuiStorage",
"ImGuiStyle": "struct ImGuiStyle",
"ImGuiStyleVar": "int",
"ImGuiTextBuffer": "struct ImGuiTextBuffer",
"ImGuiTextFilter": "struct ImGuiTextFilter",
"ImGuiTreeNodeFlags": "int",
"ImGuiWindowFlags": "int",
"ImS32": "signed int",
"ImS64": "int64_t",
"ImTextureID": "void*",
"ImU32": "unsigned int",
"ImU64": "uint64_t",
"ImVec2": "struct ImVec2",
"ImVec4": "struct ImVec4",
"ImWchar": "unsigned short",
"Pair": "struct Pair",
"TextRange": "struct TextRange",
"const_iterator": "const value_type*",
"iterator": "value_type*",
"value_type": "T"
}

2
imgui

Submodule imgui updated: da3c4330c1...801645d350

6
testbuildc/build.bat Normal file
View File

@@ -0,0 +1,6 @@
set PATH=%PATH%;C:\mingw32\bin;
::set PATH=%PATH%;C:\i686-7.2.0-release-posix-dwarf-rt_v5-rev1\mingw32\bin;
::gcc -std=c99 -DCIMGUI_DEFINE_ENUMS_AND_STRUCTS cimgui.h
::gcc -DCIMGUI_DEFINE_ENUMS_AND_STRUCTS cimgui.h
gcc -DCIMGUI_DEFINE_ENUMS_AND_STRUCTS cimguitest.c
cmd /k

5
testbuildc/cimguitest.c Normal file
View File

@@ -0,0 +1,5 @@
#include "../cimgui.h"
void main(void)
{
}

13
testbuildc/testcl.bat Normal file
View File

@@ -0,0 +1,13 @@
::set PATH=%PATH%;C:\luaGL;C:\mingw32\bin;
::gcc -E -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ../imgui/imgui.h > 11.txt
::set PATH=%PATH%;C:\luaGL;
::set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\Hostx64\x64;
::ejecutar en cmd esto
::"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
::cl /P /DIMGUI_DISABLE_OBSOLETE_FUNCTIONS /DIMGUI_API="" /DIMGUI_IMPL_API="" ../imgui/imgui.h
:: > clout.txt
cl /P /DCIMGUI_DEFINE_ENUMS_AND_STRUCTS cimguitest.c
cmd /k