generator using tabs in structs

This commit is contained in:
sonoro1234
2018-04-27 17:50:27 +02:00
parent c735efe55a
commit 851df218da
2 changed files with 349 additions and 349 deletions

View File

@@ -1,7 +1,7 @@
--script for imgui_structs.h generation --script for imgui_structs.h generation
function strip(cad) function strip(cad)
return cad:gsub("^%s*(.-)%s*$","%1") return cad:gsub("^%s*(.-)%s*$","%1")
end end
@@ -22,63 +22,49 @@ local in_function = false
for line in io.lines() do for line in io.lines() do
repeat -- simulate continue with break repeat -- simulate continue with break
--print(line) --print(line)
line = strip(line) line = strip(line)
if #line == 0 then break end if #line == 0 then break end
-- Is this a preprocessor statement? -- Is this a preprocessor statement?
if line:sub(1,1) == "#" then if line:sub(1,1) == "#" then
-- Is this a location pragma? -- Is this a location pragma?
local location_match = line:match(location_re) local location_match = line:match(location_re)
if location_match then if location_match then
--print("location_match",line) --print("location_match",line)
-- If we are transitioning to a header we need to parse, set the flag -- If we are transitioning to a header we need to parse, set the flag
local cimpath_match,aaa = location_match:match(cimpath_re) local cimpath_match,aaa = location_match:match(cimpath_re)
in_imgui = (cimpath_match ~= nil) in_imgui = (cimpath_match ~= nil)
--if in_gl then print(aaa) end --if in_gl then print(aaa) end
break break
end end
elseif in_imgui then elseif in_imgui then
--[[ --if in_function discard
-- Windows likes to add __stdcall__ to everything, but it isn't needed and is actually harmful when using under linux. if in_function then
-- However, it is needed for callbacks in windows. if line:match(function_closing_re) then
--if line:find("typedef") >= 0 and line.find(" PFNGL") < 0: in_function = false
if line:find("typedef") and not line:find(" PFNGL") then end
--line = line:gsub("__attribute__%(%(__stdcall__%)%) ", 'WINDOWS_STDCALL ') break
line = line:gsub('GL_APIENTRY ' , 'WINDOWS_STDCALL ') end
else
--line = line:gsub("__attribute__%(%(__stdcall__%)%) ", '') if line:match(function_re) and not line:match("typedef.*%b().*%b().*") then
line = line:gsub('GL_APIENTRY ', '') -- function and functypedef
end if not line:match(function_closed_re) then
-- While linux likes to add __attribute__((visibility("default"))) in_function = true
line = line:gsub('__attribute__%(%(visibility%("default"%)%)%) ', '') end
line = line:gsub("__attribute__%(%(__stdcall__%)%) ", '') elseif line:match("template") then
--]] --nothing
if in_function then elseif line:match("public") then
if line:match(function_closing_re) then --nothing
in_function = false else
end --line = line:gsub("class","struct")
break --line = line:gsub("mutable","")
end line = line:gsub("%S+",{class="struct",mutable=""})
if line:match(function_re) and not line:match("typedef.*%b().*%b().*") then line = line:gsub("(%b<>)","/%*%1%*/") --comment template parameters
--if not line:match("typedef.*%b().*%b().*") then --functypedef table.insert(cdefs,line)
if not line:match(function_closed_re) then end
in_function = true end
end
--end
elseif line:match("template") then
--nothing
elseif line:match("public") then
--nothing
else
--line = line:gsub("class","struct")
--line = line:gsub("mutable","")
line = line:gsub("%S+",{class="struct",mutable=""})
line = line:gsub("(%b<>)","/%*%1%*/") --comment template parameters
table.insert(cdefs,line)
end
end
until true until true
end end
@@ -92,76 +78,90 @@ local struct_op_close_re = "%b{}"
local structnames = {} local structnames = {}
local innerstructs = {} local innerstructs = {}
-- Output the file -- Output the file
print("#ifndef IMGUI_STRUCTS_INCLUDED") print("/////////////// BEGIN AUTOGENERATED SEGMENT")
print("#define IMGUI_STRUCTS_INCLUDED") print("#ifndef IMGUI_STRUCTS_INCLUDED")
print("/////////////// BEGIN AUTOGENERATED SEGMENT") print("#define IMGUI_STRUCTS_INCLUDED")
for i,line in ipairs(cdefs) do
repeat -- simulating continue with break for i,line in ipairs(cdefs) do
repeat -- simulating continue with break
if line:match(namespace_re) then
in_namespace = true if line:match(namespace_re) then
end in_namespace = true
structnames[#structnames + 1] = line:match(struct_re) end
local structbegin = line:match(struct_re)
if in_namespace then if structbegin then
if line:match(function_closing_re) then structnames[#structnames + 1] = structbegin
--io.write( line,"\n") if #structnames < 2 and structbegin~= "ImVector" then --not inner and not ImVector
in_namespace = false io.write(line,"\n")
end break
break -- dont write anything inside end
end end
if structnames[#structnames] == "ImVector" then if structnames[#structnames] == "ImVector" then
if line:match(struct_closing_re) then if line:match(struct_closing_re) then
io.write[[struct ImVector io.write[[struct ImVector
{ {
int Size; int Size;
int Capacity; int Capacity;
void* Data; void* Data;
}; };
typedef struct ImVector ImVector;]] typedef struct ImVector ImVector;]]
structnames[#structnames] = nil structnames[#structnames] = nil
end end
break -- dont write break -- dont write
end end
if #structnames < 2 then -- not inner if in_namespace then
if (#structnames > 0) and line:match("typedef") then --dont allow inner typedefs if line:match(function_closing_re) then
break --io.write( line,"\n")
end in_namespace = false
io.write( line,"\n") end
local struct_closed_name = line:match(struct_closed_re) break -- dont write anything inside
if struct_closed_name then end
io.write("typedef struct ",struct_closed_name," ",struct_closed_name,";\n")
end if #structnames < 2 then -- not inner
end if (#structnames > 0) then
if line:match("typedef") then --dont allow inner typedefs
break
elseif not line:match("^{$") and not line:match(struct_closing_re) then --avoid tab { and };
line = " "..line
end
end
io.write( line,"\n")
local struct_closed_name = line:match(struct_closed_re)
if struct_closed_name then
io.write("typedef struct ",struct_closed_name," ",struct_closed_name,";\n")
end
end
--if structnames[#structnames] then if #structnames > 0 then
if #structnames > 0 then if #structnames > 1 then --inner structs
if #structnames > 1 then --inner innerstructs[structnames[#structnames]] = innerstructs[structnames[#structnames]] or {}
innerstructs[structnames[#structnames]] = innerstructs[structnames[#structnames]] or {} local st = innerstructs[structnames[#structnames]]
local st = innerstructs[structnames[#structnames]] if not line:match("struct") and not line:match("^{$") and not line:match(struct_closing_re) then --avoid tab in struct { and };
st[#st + 1] = line line = " "..line
if line:match(struct_closing_re) and not line:match(struct_op_close_re) then end
local structname = structnames[#structnames] st[#st + 1] = line
st[#st + 1] = string.format("typedef struct %s %s;\n",structname,structname) if line:match(struct_closing_re) and not line:match(struct_op_close_re) then
structnames[#structnames] = nil local structname = structnames[#structnames]
end st[#st + 1] = string.format("typedef struct %s %s;\n",structname,structname)
elseif line:match(struct_closing_re) and not line:match(struct_op_close_re) then structnames[#structnames] = nil
local structname = structnames[#structnames] end
io.write("typedef struct ",structname," ",structname,";\n") elseif line:match(struct_closing_re) and not line:match(struct_op_close_re) then
structnames[#structnames] = nil local structname = structnames[#structnames]
end io.write("typedef struct ",structname," ",structname,";\n")
end structnames[#structnames] = nil
end
end
until true until true
end end
for k,v in pairs(innerstructs) do for k,v in pairs(innerstructs) do
for i,line in ipairs(v) do for i,line in ipairs(v) do
print(line) print(line)
end end
end end
print("#endif //IMGUI_STRUCTS_INCLUDED")
print("//////////////// END AUTOGENERATED SEGMENT ")
print("//////////////// END AUTOGENERATED SEGMENT ")
print("#endif //IMGUI_STRUCTS_INCLUDED")

View File

@@ -1,6 +1,6 @@
/////////////// BEGIN AUTOGENERATED SEGMENT
#ifndef IMGUI_STRUCTS_INCLUDED #ifndef IMGUI_STRUCTS_INCLUDED
#define IMGUI_STRUCTS_INCLUDED #define IMGUI_STRUCTS_INCLUDED
/////////////// BEGIN AUTOGENERATED SEGMENT
struct ImDrawChannel; struct ImDrawChannel;
typedef struct ImDrawChannel ImDrawChannel; typedef struct ImDrawChannel ImDrawChannel;
struct ImDrawCmd; struct ImDrawCmd;
@@ -74,12 +74,12 @@ typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data);
typedef unsigned long long ImU64; typedef unsigned long long ImU64;
struct ImVec2 struct ImVec2
{ {
float x, y; float x, y;
}; };
typedef struct ImVec2 ImVec2; typedef struct ImVec2 ImVec2;
struct ImVec4 struct ImVec4
{ {
float x, y, z, w; float x, y, z, w;
}; };
typedef struct ImVec4 ImVec4; typedef struct ImVec4 ImVec4;
enum ImGuiWindowFlags_ enum ImGuiWindowFlags_
@@ -396,205 +396,205 @@ ImGuiCond_Appearing = 1 << 3
}; };
struct ImGuiStyle struct ImGuiStyle
{ {
float Alpha; float Alpha;
ImVec2 WindowPadding; ImVec2 WindowPadding;
float WindowRounding; float WindowRounding;
float WindowBorderSize; float WindowBorderSize;
ImVec2 WindowMinSize; ImVec2 WindowMinSize;
ImVec2 WindowTitleAlign; ImVec2 WindowTitleAlign;
float ChildRounding; float ChildRounding;
float ChildBorderSize; float ChildBorderSize;
float PopupRounding; float PopupRounding;
float PopupBorderSize; float PopupBorderSize;
ImVec2 FramePadding; ImVec2 FramePadding;
float FrameRounding; float FrameRounding;
float FrameBorderSize; float FrameBorderSize;
ImVec2 ItemSpacing; ImVec2 ItemSpacing;
ImVec2 ItemInnerSpacing; ImVec2 ItemInnerSpacing;
ImVec2 TouchExtraPadding; ImVec2 TouchExtraPadding;
float IndentSpacing; float IndentSpacing;
float ColumnsMinSpacing; float ColumnsMinSpacing;
float ScrollbarSize; float ScrollbarSize;
float ScrollbarRounding; float ScrollbarRounding;
float GrabMinSize; float GrabMinSize;
float GrabRounding; float GrabRounding;
ImVec2 ButtonTextAlign; ImVec2 ButtonTextAlign;
ImVec2 DisplayWindowPadding; ImVec2 DisplayWindowPadding;
ImVec2 DisplaySafeAreaPadding; ImVec2 DisplaySafeAreaPadding;
float MouseCursorScale; float MouseCursorScale;
bool AntiAliasedLines; bool AntiAliasedLines;
bool AntiAliasedFill; bool AntiAliasedFill;
float CurveTessellationTol; float CurveTessellationTol;
ImVec4 Colors[ImGuiCol_COUNT]; ImVec4 Colors[ImGuiCol_COUNT];
}; };
typedef struct ImGuiStyle ImGuiStyle; typedef struct ImGuiStyle ImGuiStyle;
struct ImGuiIO struct ImGuiIO
{ {
ImGuiConfigFlags ConfigFlags; ImGuiConfigFlags ConfigFlags;
ImGuiBackendFlags BackendFlags; ImGuiBackendFlags BackendFlags;
ImVec2 DisplaySize; ImVec2 DisplaySize;
float DeltaTime; float DeltaTime;
float IniSavingRate; float IniSavingRate;
const char* IniFilename; const char* IniFilename;
const char* LogFilename; const char* LogFilename;
float MouseDoubleClickTime; float MouseDoubleClickTime;
float MouseDoubleClickMaxDist; float MouseDoubleClickMaxDist;
float MouseDragThreshold; float MouseDragThreshold;
int KeyMap[ImGuiKey_COUNT]; int KeyMap[ImGuiKey_COUNT];
float KeyRepeatDelay; float KeyRepeatDelay;
float KeyRepeatRate; float KeyRepeatRate;
void* UserData; void* UserData;
ImFontAtlas* Fonts; ImFontAtlas* Fonts;
float FontGlobalScale; float FontGlobalScale;
bool FontAllowUserScaling; bool FontAllowUserScaling;
ImFont* FontDefault; ImFont* FontDefault;
ImVec2 DisplayFramebufferScale; ImVec2 DisplayFramebufferScale;
ImVec2 DisplayVisibleMin; ImVec2 DisplayVisibleMin;
ImVec2 DisplayVisibleMax; ImVec2 DisplayVisibleMax;
bool OptMacOSXBehaviors; bool OptMacOSXBehaviors;
bool OptCursorBlink; bool OptCursorBlink;
void* ClipboardUserData; void* ClipboardUserData;
void* ImeWindowHandle; void* ImeWindowHandle;
ImVec2 MousePos; ImVec2 MousePos;
bool MouseDown[5]; bool MouseDown[5];
float MouseWheel; float MouseWheel;
float MouseWheelH; float MouseWheelH;
bool MouseDrawCursor; bool MouseDrawCursor;
bool KeyCtrl; bool KeyCtrl;
bool KeyShift; bool KeyShift;
bool KeyAlt; bool KeyAlt;
bool KeySuper; bool KeySuper;
bool KeysDown[512]; bool KeysDown[512];
ImWchar InputCharacters[16+1]; ImWchar InputCharacters[16+1];
float NavInputs[ImGuiNavInput_COUNT]; float NavInputs[ImGuiNavInput_COUNT];
bool WantCaptureMouse; bool WantCaptureMouse;
bool WantCaptureKeyboard; bool WantCaptureKeyboard;
bool WantTextInput; bool WantTextInput;
bool WantSetMousePos; bool WantSetMousePos;
bool NavActive; bool NavActive;
bool NavVisible; bool NavVisible;
float Framerate; float Framerate;
int MetricsRenderVertices; int MetricsRenderVertices;
int MetricsRenderIndices; int MetricsRenderIndices;
int MetricsActiveWindows; int MetricsActiveWindows;
ImVec2 MouseDelta; ImVec2 MouseDelta;
ImVec2 MousePosPrev; ImVec2 MousePosPrev;
ImVec2 MouseClickedPos[5]; ImVec2 MouseClickedPos[5];
float MouseClickedTime[5]; float MouseClickedTime[5];
bool MouseClicked[5]; bool MouseClicked[5];
bool MouseDoubleClicked[5]; bool MouseDoubleClicked[5];
bool MouseReleased[5]; bool MouseReleased[5];
bool MouseDownOwned[5]; bool MouseDownOwned[5];
float MouseDownDuration[5]; float MouseDownDuration[5];
float MouseDownDurationPrev[5]; float MouseDownDurationPrev[5];
ImVec2 MouseDragMaxDistanceAbs[5]; ImVec2 MouseDragMaxDistanceAbs[5];
float MouseDragMaxDistanceSqr[5]; float MouseDragMaxDistanceSqr[5];
float KeysDownDuration[512]; float KeysDownDuration[512];
float KeysDownDurationPrev[512]; float KeysDownDurationPrev[512];
float NavInputsDownDuration[ImGuiNavInput_COUNT]; float NavInputsDownDuration[ImGuiNavInput_COUNT];
float NavInputsDownDurationPrev[ImGuiNavInput_COUNT]; float NavInputsDownDurationPrev[ImGuiNavInput_COUNT];
}; };
typedef struct ImGuiIO ImGuiIO; typedef struct ImGuiIO ImGuiIO;
struct ImVector struct ImVector
{ {
int Size; int Size;
int Capacity; int Capacity;
void* Data; void* Data;
}; };
typedef struct ImVector ImVector;struct ImNewDummy {}; typedef struct ImVector ImVector;struct ImNewDummy {};
struct ImGuiOnceUponAFrame struct ImGuiOnceUponAFrame
{ {
int RefFrame; int RefFrame;
}; };
typedef struct ImGuiOnceUponAFrame ImGuiOnceUponAFrame; typedef struct ImGuiOnceUponAFrame ImGuiOnceUponAFrame;
struct ImGuiTextFilter struct ImGuiTextFilter
{ {
char InputBuf[256]; char InputBuf[256];
ImVector/*<TextRange>*/ Filters; ImVector/*<TextRange>*/ Filters;
int CountGrep; int CountGrep;
}; };
typedef struct ImGuiTextFilter ImGuiTextFilter; typedef struct ImGuiTextFilter ImGuiTextFilter;
struct ImGuiTextBuffer struct ImGuiTextBuffer
{ {
ImVector/*<char>*/ Buf; ImVector/*<char>*/ Buf;
}; };
typedef struct ImGuiTextBuffer ImGuiTextBuffer; typedef struct ImGuiTextBuffer ImGuiTextBuffer;
struct ImGuiStorage struct ImGuiStorage
{ {
ImVector/*<Pair>*/ Data; ImVector/*<Pair>*/ Data;
}; };
typedef struct ImGuiStorage ImGuiStorage; typedef struct ImGuiStorage ImGuiStorage;
struct ImGuiTextEditCallbackData struct ImGuiTextEditCallbackData
{ {
ImGuiInputTextFlags EventFlag; ImGuiInputTextFlags EventFlag;
ImGuiInputTextFlags Flags; ImGuiInputTextFlags Flags;
void* UserData; void* UserData;
bool ReadOnly; bool ReadOnly;
ImWchar EventChar; ImWchar EventChar;
ImGuiKey EventKey; ImGuiKey EventKey;
char* Buf; char* Buf;
int BufTextLen; int BufTextLen;
int BufSize; int BufSize;
bool BufDirty; bool BufDirty;
int CursorPos; int CursorPos;
int SelectionStart; int SelectionStart;
int SelectionEnd; int SelectionEnd;
}; };
typedef struct ImGuiTextEditCallbackData ImGuiTextEditCallbackData; typedef struct ImGuiTextEditCallbackData ImGuiTextEditCallbackData;
struct ImGuiSizeCallbackData struct ImGuiSizeCallbackData
{ {
void* UserData; void* UserData;
ImVec2 Pos; ImVec2 Pos;
ImVec2 CurrentSize; ImVec2 CurrentSize;
ImVec2 DesiredSize; ImVec2 DesiredSize;
}; };
typedef struct ImGuiSizeCallbackData ImGuiSizeCallbackData; typedef struct ImGuiSizeCallbackData ImGuiSizeCallbackData;
struct ImGuiPayload struct ImGuiPayload
{ {
const void* Data; const void* Data;
int DataSize; int DataSize;
ImGuiID SourceId; ImGuiID SourceId;
ImGuiID SourceParentId; ImGuiID SourceParentId;
int DataFrameCount; int DataFrameCount;
char DataType[32+1]; char DataType[32+1];
bool Preview; bool Preview;
bool Delivery; bool Delivery;
}; };
typedef struct ImGuiPayload ImGuiPayload; typedef struct ImGuiPayload ImGuiPayload;
struct ImColor struct ImColor
{ {
ImVec4 Value; ImVec4 Value;
}; };
typedef struct ImColor ImColor; typedef struct ImColor ImColor;
struct ImGuiListClipper struct ImGuiListClipper
{ {
float StartPosY; float StartPosY;
float ItemsHeight; float ItemsHeight;
int ItemsCount, StepNo, DisplayStart, DisplayEnd; int ItemsCount, StepNo, DisplayStart, DisplayEnd;
}; };
typedef struct ImGuiListClipper ImGuiListClipper; typedef struct ImGuiListClipper ImGuiListClipper;
typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd); typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd);
struct ImDrawCmd struct ImDrawCmd
{ {
unsigned int ElemCount; unsigned int ElemCount;
ImVec4 ClipRect; ImVec4 ClipRect;
ImTextureID TextureId; ImTextureID TextureId;
ImDrawCallback UserCallback; ImDrawCallback UserCallback;
void* UserCallbackData; void* UserCallbackData;
}; };
typedef struct ImDrawCmd ImDrawCmd; typedef struct ImDrawCmd ImDrawCmd;
typedef unsigned short ImDrawIdx; typedef unsigned short ImDrawIdx;
struct ImDrawVert struct ImDrawVert
{ {
ImVec2 pos; ImVec2 pos;
ImVec2 uv; ImVec2 uv;
ImU32 col; ImU32 col;
}; };
typedef struct ImDrawVert ImDrawVert; typedef struct ImDrawVert ImDrawVert;
struct ImDrawChannel struct ImDrawChannel
{ {
ImVector/*<ImDrawCmd>*/ CmdBuffer; ImVector/*<ImDrawCmd>*/ CmdBuffer;
ImVector/*<ImDrawIdx>*/ IdxBuffer; ImVector/*<ImDrawIdx>*/ IdxBuffer;
}; };
typedef struct ImDrawChannel ImDrawChannel; typedef struct ImDrawChannel ImDrawChannel;
enum ImDrawCornerFlags_ enum ImDrawCornerFlags_
@@ -616,58 +616,58 @@ ImDrawListFlags_AntiAliasedFill = 1 << 1
}; };
struct ImDrawList struct ImDrawList
{ {
ImVector/*<ImDrawCmd>*/ CmdBuffer; ImVector/*<ImDrawCmd>*/ CmdBuffer;
ImVector/*<ImDrawIdx>*/ IdxBuffer; ImVector/*<ImDrawIdx>*/ IdxBuffer;
ImVector/*<ImDrawVert>*/ VtxBuffer; ImVector/*<ImDrawVert>*/ VtxBuffer;
ImDrawListFlags Flags; ImDrawListFlags Flags;
const ImDrawListSharedData* _Data; const ImDrawListSharedData* _Data;
const char* _OwnerName; const char* _OwnerName;
unsigned int _VtxCurrentIdx; unsigned int _VtxCurrentIdx;
ImDrawVert* _VtxWritePtr; ImDrawVert* _VtxWritePtr;
ImDrawIdx* _IdxWritePtr; ImDrawIdx* _IdxWritePtr;
ImVector/*<ImVec4>*/ _ClipRectStack; ImVector/*<ImVec4>*/ _ClipRectStack;
ImVector/*<ImTextureID>*/ _TextureIdStack; ImVector/*<ImTextureID>*/ _TextureIdStack;
ImVector/*<ImVec2>*/ _Path; ImVector/*<ImVec2>*/ _Path;
int _ChannelsCurrent; int _ChannelsCurrent;
int _ChannelsCount; int _ChannelsCount;
ImVector/*<ImDrawChannel>*/ _Channels; ImVector/*<ImDrawChannel>*/ _Channels;
}; };
typedef struct ImDrawList ImDrawList; typedef struct ImDrawList ImDrawList;
struct ImDrawData struct ImDrawData
{ {
bool Valid; bool Valid;
ImDrawList** CmdLists; ImDrawList** CmdLists;
int CmdListsCount; int CmdListsCount;
int TotalIdxCount; int TotalIdxCount;
int TotalVtxCount; int TotalVtxCount;
}; };
typedef struct ImDrawData ImDrawData; typedef struct ImDrawData ImDrawData;
struct ImFontConfig struct ImFontConfig
{ {
void* FontData; void* FontData;
int FontDataSize; int FontDataSize;
bool FontDataOwnedByAtlas; bool FontDataOwnedByAtlas;
int FontNo; int FontNo;
float SizePixels; float SizePixels;
int OversampleH; int OversampleH;
int OversampleV; int OversampleV;
bool PixelSnapH; bool PixelSnapH;
ImVec2 GlyphExtraSpacing; ImVec2 GlyphExtraSpacing;
ImVec2 GlyphOffset; ImVec2 GlyphOffset;
const ImWchar* GlyphRanges; const ImWchar* GlyphRanges;
bool MergeMode; bool MergeMode;
unsigned int RasterizerFlags; unsigned int RasterizerFlags;
float RasterizerMultiply; float RasterizerMultiply;
char Name[40]; char Name[40];
ImFont* DstFont; ImFont* DstFont;
}; };
typedef struct ImFontConfig ImFontConfig; typedef struct ImFontConfig ImFontConfig;
struct ImFontGlyph struct ImFontGlyph
{ {
ImWchar Codepoint; ImWchar Codepoint;
float AdvanceX; float AdvanceX;
float X0, Y0, X1, Y1; float X0, Y0, X1, Y1;
float U0, V0, U1, V1; float U0, V0, U1, V1;
}; };
typedef struct ImFontGlyph ImFontGlyph; typedef struct ImFontGlyph ImFontGlyph;
enum ImFontAtlasFlags_ enum ImFontAtlasFlags_
@@ -677,71 +677,71 @@ ImFontAtlasFlags_NoMouseCursors = 1 << 1
}; };
struct ImFontAtlas struct ImFontAtlas
{ {
ImFontAtlasFlags Flags; ImFontAtlasFlags Flags;
ImTextureID TexID; ImTextureID TexID;
int TexDesiredWidth; int TexDesiredWidth;
int TexGlyphPadding; int TexGlyphPadding;
unsigned char* TexPixelsAlpha8; unsigned char* TexPixelsAlpha8;
unsigned int* TexPixelsRGBA32; unsigned int* TexPixelsRGBA32;
int TexWidth; int TexWidth;
int TexHeight; int TexHeight;
ImVec2 TexUvScale; ImVec2 TexUvScale;
ImVec2 TexUvWhitePixel; ImVec2 TexUvWhitePixel;
ImVector/*<ImFont*>*/ Fonts; ImVector/*<ImFont*>*/ Fonts;
ImVector/*<CustomRect>*/ CustomRects; ImVector/*<CustomRect>*/ CustomRects;
ImVector/*<ImFontConfig>*/ ConfigData; ImVector/*<ImFontConfig>*/ ConfigData;
int CustomRectIds[1]; int CustomRectIds[1];
}; };
typedef struct ImFontAtlas ImFontAtlas; typedef struct ImFontAtlas ImFontAtlas;
struct ImFont struct ImFont
{ {
float FontSize; float FontSize;
float Scale; float Scale;
ImVec2 DisplayOffset; ImVec2 DisplayOffset;
ImVector/*<ImFontGlyph>*/ Glyphs; ImVector/*<ImFontGlyph>*/ Glyphs;
ImVector/*<float>*/ IndexAdvanceX; ImVector/*<float>*/ IndexAdvanceX;
ImVector/*<unsigned short>*/ IndexLookup; ImVector/*<unsigned short>*/ IndexLookup;
const ImFontGlyph* FallbackGlyph; const ImFontGlyph* FallbackGlyph;
float FallbackAdvanceX; float FallbackAdvanceX;
ImWchar FallbackChar; ImWchar FallbackChar;
short ConfigDataCount; short ConfigDataCount;
ImFontConfig* ConfigData; ImFontConfig* ConfigData;
ImFontAtlas* ContainerAtlas; ImFontAtlas* ContainerAtlas;
float Ascent, Descent; float Ascent, Descent;
bool DirtyLookupTables; bool DirtyLookupTables;
int MetricsTotalSurface; int MetricsTotalSurface;
}; };
typedef struct ImFont ImFont; typedef struct ImFont ImFont;
struct GlyphRangesBuilder struct GlyphRangesBuilder
{ {
ImVector/*<unsigned char>*/ UsedChars; ImVector/*<unsigned char>*/ UsedChars;
}; };
typedef struct GlyphRangesBuilder GlyphRangesBuilder; typedef struct GlyphRangesBuilder GlyphRangesBuilder;
struct CustomRect struct CustomRect
{ {
unsigned int ID; unsigned int ID;
unsigned short Width, Height; unsigned short Width, Height;
unsigned short X, Y; unsigned short X, Y;
float GlyphAdvanceX; float GlyphAdvanceX;
ImVec2 GlyphOffset; ImVec2 GlyphOffset;
ImFont* Font; ImFont* Font;
}; };
typedef struct CustomRect CustomRect; typedef struct CustomRect CustomRect;
struct TextRange struct TextRange
{ {
const char* b; const char* b;
const char* e; const char* e;
}; };
typedef struct TextRange TextRange; typedef struct TextRange TextRange;
struct Pair struct Pair
{ {
ImGuiID key; ImGuiID key;
union { int val_i; float val_f; void* val_p; }; union { int val_i; float val_f; void* val_p; };
}; };
typedef struct Pair Pair; typedef struct Pair Pair;
//////////////// END AUTOGENERATED SEGMENT
#endif //IMGUI_STRUCTS_INCLUDED #endif //IMGUI_STRUCTS_INCLUDED
//////////////// END AUTOGENERATED SEGMENT