mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-14 05:38:29 +01:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
204f2828bb | ||
![]() |
2c10d47b9a | ||
![]() |
df00156746 | ||
![]() |
553364f7d8 |
@@ -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
|
||||
|
||||
#include "./imgui/imgui.h"
|
||||
#include "cimgui.h"
|
||||
|
||||
|
4
cimgui.h
4
cimgui.h
@@ -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
|
||||
#ifndef CIMGUI_INCLUDED
|
||||
#define CIMGUI_INCLUDED
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
@@ -603,7 +605,6 @@ struct ImGuiTextFilter
|
||||
struct ImGuiTextBuffer
|
||||
{
|
||||
ImVector_char Buf;
|
||||
char EmptyString[1];
|
||||
};
|
||||
struct ImGuiStorage
|
||||
{
|
||||
@@ -1444,6 +1445,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
|
||||
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
||||
|
@@ -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","_")
|
||||
|
@@ -82,7 +82,7 @@ local function encode_table(val, stack)
|
||||
table.insert(res, encode(v, stack))
|
||||
end
|
||||
stack[val] = nil
|
||||
return "[" .. table.concat(res, ",") .. "]"
|
||||
return "[" .. table.concat(res, ",\n") .. "]"
|
||||
|
||||
else
|
||||
-- Treat as an object
|
||||
@@ -93,7 +93,7 @@ local function encode_table(val, stack)
|
||||
table.insert(res, encode(k, stack) .. ":" .. encode(v, stack))
|
||||
end
|
||||
stack[val] = nil
|
||||
return "{" .. table.concat(res, ",") .. "}"
|
||||
return "{" .. table.concat(res, ",\n") .. "}"
|
||||
end
|
||||
end
|
||||
|
||||
|
@@ -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
|
||||
|
||||
#include "./imgui/imgui.h"
|
||||
#include "cimgui.h"
|
||||
|
||||
|
@@ -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
|
||||
#ifndef CIMGUI_INCLUDED
|
||||
#define CIMGUI_INCLUDED
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
@@ -603,7 +605,6 @@ struct ImGuiTextFilter
|
||||
struct ImGuiTextBuffer
|
||||
{
|
||||
ImVector_char Buf;
|
||||
char EmptyString[1];
|
||||
};
|
||||
struct ImGuiStorage
|
||||
{
|
||||
@@ -1444,6 +1445,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
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1958,10 +1958,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]"
|
||||
|
@@ -1 +1,65 @@
|
||||
{"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"}
|
||||
{"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"}
|
6
testbuildc/build.bat
Normal file
6
testbuildc/build.bat
Normal 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
5
testbuildc/cimguitest.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "../cimgui.h"
|
||||
|
||||
void main(void)
|
||||
{
|
||||
}
|
13
testbuildc/testcl.bat
Normal file
13
testbuildc/testcl.bat
Normal 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
|
Reference in New Issue
Block a user