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

@@ -40,33 +40,19 @@ repeat -- simulate continue with break
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.
-- However, it is needed for callbacks in windows.
--if line:find("typedef") >= 0 and line.find(" PFNGL") < 0:
if line:find("typedef") and not line:find(" PFNGL") then
--line = line:gsub("__attribute__%(%(__stdcall__%)%) ", 'WINDOWS_STDCALL ')
line = line:gsub('GL_APIENTRY ' , 'WINDOWS_STDCALL ')
else
--line = line:gsub("__attribute__%(%(__stdcall__%)%) ", '')
line = line:gsub('GL_APIENTRY ', '')
end
-- While linux likes to add __attribute__((visibility("default")))
line = line:gsub('__attribute__%(%(visibility%("default"%)%)%) ', '')
line = line:gsub("__attribute__%(%(__stdcall__%)%) ", '')
--]]
if in_function then if in_function then
if line:match(function_closing_re) then if line:match(function_closing_re) then
in_function = false in_function = false
end end
break break
end end
if line:match(function_re) and not line:match("typedef.*%b().*%b().*") then if line:match(function_re) and not line:match("typedef.*%b().*%b().*") then
--if not line:match("typedef.*%b().*%b().*") then --functypedef -- function and functypedef
if not line:match(function_closed_re) then if not line:match(function_closed_re) then
in_function = true in_function = true
end end
--end
elseif line:match("template") then elseif line:match("template") then
--nothing --nothing
elseif line:match("public") then elseif line:match("public") then
@@ -92,16 +78,38 @@ local struct_op_close_re = "%b{}"
local structnames = {} local structnames = {}
local innerstructs = {} local innerstructs = {}
-- Output the file -- Output the file
print("/////////////// BEGIN AUTOGENERATED SEGMENT")
print("#ifndef IMGUI_STRUCTS_INCLUDED") print("#ifndef IMGUI_STRUCTS_INCLUDED")
print("#define IMGUI_STRUCTS_INCLUDED") print("#define IMGUI_STRUCTS_INCLUDED")
print("/////////////// BEGIN AUTOGENERATED SEGMENT")
for i,line in ipairs(cdefs) do for i,line in ipairs(cdefs) do
repeat -- simulating continue with break repeat -- simulating continue with break
if line:match(namespace_re) then if line:match(namespace_re) then
in_namespace = true in_namespace = true
end end
structnames[#structnames + 1] = line:match(struct_re) local structbegin = line:match(struct_re)
if structbegin then
structnames[#structnames + 1] = structbegin
if #structnames < 2 and structbegin~= "ImVector" then --not inner and not ImVector
io.write(line,"\n")
break
end
end
if structnames[#structnames] == "ImVector" then
if line:match(struct_closing_re) then
io.write[[struct ImVector
{
int Size;
int Capacity;
void* Data;
};
typedef struct ImVector ImVector;]]
structnames[#structnames] = nil
end
break -- dont write
end
if in_namespace then if in_namespace then
if line:match(function_closing_re) then if line:match(function_closing_re) then
@@ -111,23 +119,13 @@ local innerstructs = {}
break -- dont write anything inside break -- dont write anything inside
end end
if structnames[#structnames] == "ImVector" then
if line:match(struct_closing_re) then
io.write[[struct ImVector
{
int Size;
int Capacity;
void* Data;
};
typedef struct ImVector ImVector;]]
structnames[#structnames] = nil
end
break -- dont write
end
if #structnames < 2 then -- not inner if #structnames < 2 then -- not inner
if (#structnames > 0) and line:match("typedef") then --dont allow inner typedefs if (#structnames > 0) then
if line:match("typedef") then --dont allow inner typedefs
break break
elseif not line:match("^{$") and not line:match(struct_closing_re) then --avoid tab { and };
line = " "..line
end
end end
io.write( line,"\n") io.write( line,"\n")
local struct_closed_name = line:match(struct_closed_re) local struct_closed_name = line:match(struct_closed_re)
@@ -136,11 +134,13 @@ typedef struct ImVector ImVector;]]
end end
end end
--if structnames[#structnames] then
if #structnames > 0 then if #structnames > 0 then
if #structnames > 1 then --inner if #structnames > 1 then --inner structs
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 };
line = " "..line
end
st[#st + 1] = line st[#st + 1] = line
if line:match(struct_closing_re) and not line:match(struct_op_close_re) then if line:match(struct_closing_re) and not line:match(struct_op_close_re) then
local structname = structnames[#structnames] local structname = structnames[#structnames]
@@ -162,6 +162,6 @@ typedef struct ImVector ImVector;]]
print(line) print(line)
end end
end end
print("//////////////// END AUTOGENERATED SEGMENT ")
print("#endif //IMGUI_STRUCTS_INCLUDED") print("#endif //IMGUI_STRUCTS_INCLUDED")
print("//////////////// END AUTOGENERATED SEGMENT ")

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,110 +396,110 @@ 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
@@ -509,92 +509,92 @@ struct ImGuiOnceUponAFrame
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