Deleted all of the duplicate source files

These were left over when I copied stuff into a second project, but didn't delete the extras...
internals
Eric Mellino 9 years ago
parent c05147d5aa
commit bf8c7e1361
  1. 28
      src/ImGui.NET.SampleProgram/ImDrawCmd.cs
  2. 28
      src/ImGui.NET.SampleProgram/ImDrawData.cs
  3. 119
      src/ImGui.NET.SampleProgram/ImDrawList.cs
  4. 17
      src/ImGui.NET.SampleProgram/ImDrawVert.cs
  5. 81
      src/ImGui.NET.SampleProgram/ImFont.cs
  6. 73
      src/ImGui.NET.SampleProgram/ImFontAtlas.cs
  7. 26
      src/ImGui.NET.SampleProgram/ImFontConfig.cs
  8. 199
      src/ImGui.NET.SampleProgram/ImGuiIO.cs
  9. 46
      src/ImGui.NET.SampleProgram/ImGuiStyle.cs
  10. 36
      src/ImGui.NET.SampleProgram/ImGuiTextEditCallbackData.cs
  11. 16
      src/ImGui.NET.SampleProgram/ImVector.cs
  12. 778
      src/ImGui.NET.SampleProgram/Interop.ImGui.cs
  13. 7
      src/ImGui.NET.SampleProgram/project.json

@ -1,28 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ImVec4 = System.Numerics.Vector4;
using System.Runtime.InteropServices;
namespace ImGui
{
// Typically, 1 command = 1 gpu draw call (unless command is a callback)
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImDrawCmd
{
public uint ElemCount; // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
public ImVec4 ClipRect; // Clipping rectangle (x1, y1, x2, y2)
public IntPtr TextureId; // User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas.
// typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd);
public IntPtr UserCallback; // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally.
public IntPtr UserCallbackData; // The draw callback code can access this.
/*
public ImDrawCmd() { ElemCount = 0; ClipRect.X = ClipRect.Y = -8192.0f; ClipRect.Z = ClipRect.W = +8192.0f; TextureId = ImTextureID.Zero; UserCallback = null; UserCallbackData = null; }
*/
};
}

@ -1,28 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using ImVec2 = System.Numerics.Vector2;
namespace ImGui
{
// All draw data to render an ImGui frame
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImDrawData
{
public byte Valid; // Only valid after Render() is called and before the next NewFrame() is called.
public ImDrawList** CmdLists;
public int CmdListsCount;
public int TotalVtxCount; // For convenience, sum of all cmd_lists vtx_buffer.Size
public int TotalIdxCount; // For convenience, sum of all cmd_lists idx_buffer.Size
// Functions
/*
ImDrawData() { Valid = false; CmdLists = NULL; CmdListsCount = TotalVtxCount = TotalIdxCount = 0; }
IMGUI_API void DeIndexAllBuffers(); // For backward compatibility: convert all buffers from indexed to de-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!
IMGUI_API void ScaleClipRects(const ImVec2& sc); // Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than ImGui expects, or if there is a difference between your window resolution and framebuffer resolution.
*/
};
}

@ -1,119 +0,0 @@
using System;
using System.Runtime.InteropServices;
namespace ImGui
{
// Draw command list
// This is the low-level list of polygons that ImGui functions are filling. At the end of the frame, all command lists are passed to your ImGuiIO::RenderDrawListFn function for rendering.
// At the moment, each ImGui window contains its own ImDrawList but they could potentially be merged in the future.
// If you want to add custom rendering within a window, you can use ImGui::GetWindowDrawList() to access the current draw list and add your own primitives.
// You can interleave normal ImGui:: calls and adding primitives to the current draw list.
// All positions are in screen coordinates (0,0=top-left, 1 pixel per unit). Primitives are always added to the list and not culled (culling is done at render time and at a higher-level by ImGui:: functions).
// Note that this only gives you access to rendering polygons. If your intent is to create custom widgets and the publicly exposed functions/data aren't sufficient, you can add code in imgui_user.inl
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImDrawList
{
// This is what you have to render
// ImVector<ImDrawCmd> CmdBuffer; // Commands. Typically 1 command = 1 gpu draw call.
// ImVector<ImDrawIdx> IdxBuffer; // Index buffer. Each command consume ImDrawCmd::ElemCount of those
// ImVector<ImDrawVert> VtxBuffer; // Vertex buffer.
/// <summary>
/// ImVector(ImDrawCmd)
/// </summary>
public ImVector CmdBuffer; // Commands. Typically 1 command = 1 gpu draw call.
/// <summary>
/// ImVector(ImDrawIdx)
/// </summary>
public ImVector IdxBuffer; // Index buffer. Each command consume ImDrawCmd::ElemCount of those
/// <summary>
/// ImVector(ImDrawVert)
/// </summary>
public ImVector VtxBuffer; // Vertex buffer.
// [Internal, used while building lists]
public IntPtr _OwnerName; // Pointer to owner window's name (if any) for debugging
public uint _VtxCurrentIdx; // [Internal] == VtxBuffer.Size
//ImDrawVert* _VtxWritePtr; // [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
//ImDrawIdx* _IdxWritePtr; // [Internal] point within IdxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
public IntPtr _VtxWritePtr; // [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
public IntPtr _IdxWritePtr; // [Internal] point within IdxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
//ImVector<ImVec4> _ClipRectStack; // [Internal]
//ImVector<ImTextureID> _TextureIdStack; // [Internal]
//ImVector<ImVec2> _Path; // [Internal] current path building
public ImVector _ClipRectStack; // [Internal]
public ImVector _TextureIdStack; // [Internal]
public ImVector _Path; // [Internal] current path building
public int _ChannelsCurrent; // [Internal] current channel number (0)
public int _ChannelsCount; // [Internal] number of active channels (1+)
//ImVector<ImDrawChannel> _Channels; // [Internal] draw channels for columns API (not resized down so _ChannelsCount may be smaller than _Channels.Size)
public ImVector _Channels; // [Internal] draw channels for columns API (not resized down so _ChannelsCount may be smaller than _Channels.Size)
/*
ImDrawList() { _OwnerName = NULL; Clear(); }
~ImDrawList() { ClearFreeMemory(); }
IMGUI_API void Clear();
IMGUI_API void ClearFreeMemory();
IMGUI_API void PushClipRect(const ImVec4& clip_rect); // Scissoring. The values are x1, y1, x2, y2.
IMGUI_API void PushClipRectFullScreen();
IMGUI_API void PopClipRect();
IMGUI_API void PushTextureID(const ImTextureID& texture_id);
IMGUI_API void PopTextureID();
// Primitives
IMGUI_API void AddLine(const ImVec2& a, const ImVec2& b, ImU32 col, float thickness = 1.0f);
IMGUI_API void AddRect(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners = 0x0F);
IMGUI_API void AddRectFilled(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners = 0x0F);
IMGUI_API void AddRectFilledMultiColor(const ImVec2& a, const ImVec2& b, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left);
IMGUI_API void AddTriangleFilled(const ImVec2& a, const ImVec2& b, const ImVec2& c, ImU32 col);
IMGUI_API void AddCircle(const ImVec2& centre, float radius, ImU32 col, int num_segments = 12);
IMGUI_API void AddCircleFilled(const ImVec2& centre, float radius, ImU32 col, int num_segments = 12);
IMGUI_API void AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL);
IMGUI_API void AddText(const ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL, float wrap_width = 0.0f, const ImVec4* cpu_fine_clip_rect = NULL);
IMGUI_API void AddImage(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& uv0 = ImVec2(0,0), const ImVec2& uv1 = ImVec2(1,1), ImU32 col = 0xFFFFFFFF);
IMGUI_API void AddPolyline(const ImVec2* points, const int num_points, ImU32 col, bool closed, float thickness, bool anti_aliased);
IMGUI_API void AddConvexPolyFilled(const ImVec2* points, const int num_points, ImU32 col, bool anti_aliased);
IMGUI_API void AddBezierCurve(const ImVec2& pos0, const ImVec2& cp0, const ImVec2& cp1, const ImVec2& pos1, ImU32 col, float thickness, int num_segments = 0);
// Stateful path API, add points then finish with PathFill() or PathStroke()
inline void PathClear() { _Path.resize(0); }
inline void PathLineTo(const ImVec2& pos) { _Path.push_back(pos); }
inline void PathLineToMergeDuplicate(const ImVec2& pos) { if (_Path.Size == 0 || _Path[_Path.Size - 1].x != pos.x || _Path[_Path.Size - 1].y != pos.y) _Path.push_back(pos); }
inline void PathFill(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col, true); PathClear(); }
inline void PathStroke(ImU32 col, bool closed, float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, closed, thickness, true); PathClear(); }
IMGUI_API void PathArcTo(const ImVec2& centre, float radius, float a_min, float a_max, int num_segments = 10);
IMGUI_API void PathArcToFast(const ImVec2& centre, float radius, int a_min_of_12, int a_max_of_12); // Use precomputed angles for a 12 steps circle
IMGUI_API void PathBezierCurveTo(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, int num_segments = 0);
IMGUI_API void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, int rounding_corners = 0x0F);
// Channels
// - Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
// - Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
IMGUI_API void ChannelsSplit(int channels_count);
IMGUI_API void ChannelsMerge();
IMGUI_API void ChannelsSetCurrent(int channel_index);
// Advanced
IMGUI_API void AddCallback(ImDrawCallback callback, void* callback_data); // Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles.
IMGUI_API void AddDrawCmd(); // This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible
// Internal helpers
// NB: all primitives needs to be reserved via PrimReserve() beforehand!
IMGUI_API void PrimReserve(int idx_count, int vtx_count);
IMGUI_API void PrimRect(const ImVec2& a, const ImVec2& b, ImU32 col);
IMGUI_API void PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col);
inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); }
inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; }
inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; }
IMGUI_API void UpdateClipRect();
IMGUI_API void UpdateTextureID();
*/
};
}

@ -1,17 +0,0 @@
using ImVec2 = System.Numerics.Vector2;
using System.Runtime.InteropServices;
namespace ImGui
{
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImDrawVert
{
public ImVec2 pos;
public ImVec2 uv;
public uint col;
public const int PosOffset = 0;
public const int UVOffset = 8;
public const int ColOffset = 16;
};
}

@ -1,81 +0,0 @@
using ImGuiWindowFlags = System.IntPtr;
using ImGuiSetCond = System.IntPtr;
using ImGuiColorEditMode = System.IntPtr;
using ImVec2 = System.Numerics.Vector2;
using ImVec4 = System.Numerics.Vector4;
using ImGuiID = System.UInt32;
using ImTextureID = System.IntPtr;
using ImWchar = System.UInt16;
using System;
using System.Runtime.InteropServices;
namespace ImGui
{
// Font runtime data and rendering
// ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImFont
{
// Members: Settings
public float FontSize; // <user set> // Height of characters, set during loading (don't change after loading)
public float Scale; // = 1.0f // Base font scale, multiplied by the per-window font scale which you can adjust with SetFontScale()
public ImVec2 DisplayOffset; // = (0.0f,1.0f) // Offset font rendering by xx pixels
public ImWchar FallbackChar; // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
/// <summary>
/// ImFontConfig*
/// </summary>
public IntPtr ConfigData; // // Pointer within ImFontAtlas->ConfigData
public int ConfigDataCount; //
// Members: Runtime data
[StructLayout(LayoutKind.Sequential)]
internal struct Glyph
{
ImWchar Codepoint;
float XAdvance;
float X0, Y0, X1, Y1;
float U0, V0, U1, V1; // Texture coordinates
};
public float Ascent, Descent; // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
/// <summary>
/// ImFontAtlas*
/// </summary>
public IntPtr ContainerAtlas; // What we has been loaded into
/// <summary>
/// ImVector(Glyph)
/// </summary>
public ImVector Glyphs;
public Glyph* FallbackGlyph; // == FindGlyph(FontFallbackChar)
public float FallbackXAdvance; //
//ImVector<float> IndexXAdvance; // Sparse. Glyphs->XAdvance directly indexable (more cache-friendly that reading from Glyphs, for CalcTextSize functions which are often bottleneck in large UI)
//ImVector<int> IndexLookup; // Sparse. Index glyphs by Unicode code-point.
public ImVector IndexXAdvance; // Sparse. Glyphs->XAdvance directly indexable (more cache-friendly that reading from Glyphs, for CalcTextSize functions which are often bottleneck in large UI)
public ImVector IndexLookup; // Sparse. Index glyphs by Unicode code-point.
// Methods
/*
IMGUI_API ImFont();
IMGUI_API ~ImFont();
IMGUI_API void Clear();
IMGUI_API void BuildLookupTable();
IMGUI_API const Glyph* FindGlyph(unsigned short c) const;
IMGUI_API void SetFallbackChar(ImWchar c);
float GetCharAdvance(unsigned short c) const { return ((int)c<IndexXAdvance.Size) ? IndexXAdvance[(int)c] : FallbackXAdvance; }
bool IsLoaded() const { return ContainerAtlas != NULL; }
// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable.
// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable.
IMGUI_API ImVec2 CalcTextSizeA(float size, float max_width, float wrap_width, const char* text_begin, const char* text_end = NULL, const char** remaining = NULL) const; // utf8
IMGUI_API const char* CalcWordWrapPositionA(float scale, const char* text, const char* text_end, float wrap_width) const;
IMGUI_API void RenderText(float size, ImVec2 pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, ImDrawList* draw_list, float wrap_width = 0.0f, bool cpu_fine_clip = false) const;
*/
};
}

@ -1,73 +0,0 @@
using ImWchar = System.UInt16;
using ImVec2 = System.Numerics.Vector2;
using System.Runtime.InteropServices;
using System;
namespace ImGui
{
// Load and rasterize multiple TTF fonts into a same texture.
// Sharing a texture for multiple fonts allows us to reduce the number of draw calls during rendering.
// We also add custom graphic data into the texture that serves for ImGui.
// 1. (Optional) Call AddFont*** functions. If you don't call any, the default font will be loaded for you.
// 2. Call GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data.
// 3. Upload the pixels data into a texture within your graphics system.
// 4. Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture. This value will be passed back to you during rendering to identify the texture.
// 5. Call ClearTexData() to free textures memory on the heap.
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImFontAtlas
{
/*
public ImFont* AddFont(ImFontConfig* font_cfg) { }
public ImFont* AddFontDefault(ImFontConfig* font_cfg = null) { }
public ImFont* AddFontFromFileTTF(char* filename, float size_pixels, ImFontConfig* font_cfg = null, ImWchar* glyph_ranges = null) { }
public ImFont* AddFontFromMemoryTTF(void* ttf_data, int ttf_size, float size_pixels, ImFontConfig* font_cfg = null, ImWchar* glyph_ranges = null); // Transfer ownership of 'ttf_data' to ImFontAtlas, will be deleted after Build()
public ImFont* AddFontFromMemoryCompressedTTF(void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, ImFontConfig* font_cfg = null, ImWchar* glyph_ranges = null); // 'compressed_ttf_data' still owned by caller. Compress with binary_to_compressed_c.cpp
public ImFont* AddFontFromMemoryCompressedBase85TTF(char* compressed_ttf_data_base85, float size_pixels, ImFontConfig* font_cfg = null, ImWchar* glyph_ranges = null); // 'compressed_ttf_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with -base85 paramaeter
public void ClearTexData(); // Clear the CPU-side texture data. Saves RAM once the texture has been copied to graphics memory.
public void ClearInputData(); // Clear the input TTF data (inc sizes, glyph ranges)
public void ClearFonts(); // Clear the ImGui-side font data (glyphs storage, UV coordinates)
public void Clear() { } // Clear all
// Retrieve texture data
// User is in charge of copying the pixels into graphics memory, then call SetTextureUserID()
// After loading the texture into your graphic system, store your texture handle in 'TexID' (ignore if you aren't using multiple fonts nor images)
// RGBA32 format is provided for convenience and high compatibility, but note that all RGB pixels are white, so 75% of the memory is wasted.
// Pitch = Width * BytesPerPixels
public void GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = null); // 1 byte per-pixel
public void GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = null); // 4 bytes-per-pixel
void SetTexID(void* id) { TexID = id; }
// Helpers to retrieve list of common Unicode ranges (2 value per range, values are inclusive, zero-terminated list)
// (Those functions could be static but aren't so most users don't have to refer to the ImFontAtlas:: name ever if in their code; just using io.Fonts->)
public ImWchar* GetGlyphRangesDefault(); // Basic Latin, Extended Latin
public ImWchar* GetGlyphRangesKorean(); // Default + Korean characters
public ImWchar* GetGlyphRangesJapanese(); // Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs
public ImWchar* GetGlyphRangesChinese(); // Japanese + full set of about 21000 CJK Unified Ideographs
public ImWchar* GetGlyphRangesCyrillic(); // Default + about 400 Cyrillic characters
*/
// Members
// (Access texture data via GetTexData*() calls which will setup a default font for you.)
public void* TexID; // User data to refer to the texture once it has been uploaded to user's graphic systems. It ia passed back to you during rendering.
public byte* TexPixelsAlpha8; // 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight
public UIntPtr TexPixelsRGBA32; // 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4
public IntPtr TexWidth; // Texture width calculated during Build().
public IntPtr TexHeight; // Texture height calculated during Build().
public IntPtr TexDesiredWidth; // Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
public ImVec2 TexUvWhitePixel; // Texture coordinates to a white pixel (part of the TexExtraData block)
/// <summary>
/// (ImVector(ImFont*)
/// </summary>
public ImVector Fonts;
// Private
/// <summary>
/// ImVector(ImFontConfig)
/// </summary>
public ImVector ConfigData; // Internal data
/*
public bool Build(); // Build pixels data. This is automatically for you by the GetTexData*** functions.
*/
}
}

@ -1,26 +0,0 @@
using System.Runtime.InteropServices;
using ImVec2 = System.Numerics.Vector2;
using ImWchar = System.UInt16;
namespace ImGui
{
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImFontConfig
{
public void* FontData; // // TTF data
public int FontDataSize; // // TTF data size
public bool FontDataOwnedByAtlas; // true // TTF data ownership taken by the container ImFontAtlas (will delete memory itself). Set to true
public int FontNo; // 0 // Index of font within TTF file
public float SizePixels; // // Size in pixels for rasterizer
public int OversampleH, OversampleV; // 3, 1 // Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis.
public bool PixelSnapH; // false // Align every character to pixel boundary (if enabled, set OversampleH/V to 1)
public ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs
public ImWchar* GlyphRanges; // // List of Unicode range (2 value per range, values are inclusive, zero-terminated list)
public bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs).
public bool MergeGlyphCenterV; // false // When merging (multiple ImFontInput for one ImFont), vertically center new glyphs instead of aligning their baseline
// [Internal]
public fixed char Name[32]; // Name (strictly for debugging)
public ImFont* DstFont;
};
}

@ -1,199 +0,0 @@
using System;
using System.Runtime.InteropServices;
using ImVec2 = System.Numerics.Vector2;
using ImWchar = System.UInt16;
namespace ImGui
{
//void (* RenderDrawListsFn)(ImDrawData* data);
// [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal unsafe delegate void RenderDrawListsFn(ImDrawData* data);
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImGuiIO
{
//------------------------------------------------------------------
// Settings (fill once) // Default value:
//------------------------------------------------------------------
public ImVec2 DisplaySize; // <unset> // Display size, in pixels. For clamping windows positions.
public float DeltaTime; // = 1.0f/60.0f // Time elapsed since last frame, in seconds.
public float IniSavingRate; // = 5.0f // Maximum time between saving positions/sizes to .ini file, in seconds.
public IntPtr IniFilename; // = "imgui.ini" // Path to .ini file. NULL to disable .ini saving.
public IntPtr LogFilename; // = "imgui_log.txt" // Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
public float MouseDoubleClickTime; // = 0.30f // Time for a double-click, in seconds.
public float MouseDoubleClickMaxDist; // = 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
public float MouseDragThreshold; // = 6.0f // Distance threshold before considering we are dragging
public fixed int KeyMap[Constants.ImGuiKey_COUNT]; // <unset> // Map of indices into the KeysDown[512] entries array
public float KeyRepeatDelay; // = 0.250f // When holding a key/button, time before it starts repeating, in seconds. (for actions where 'repeat' is active)
public float KeyRepeatRate; // = 0.020f // When holding a key/button, rate at which it repeats, in seconds.
public IntPtr UserData; // = NULL // Store your own data for retrieval by callbacks.
public ImFontAtlas* Fonts; // <auto> // Load and assemble one or more fonts into a single tightly packed texture. Output to Fonts array.
public float FontGlobalScale; // = 1.0f // Global scale all fonts
public byte FontAllowUserScaling; // = false // Allow user scaling text of individual window with CTRL+Wheel.
public ImVec2 DisplayFramebufferScale; // = (1.0f,1.0f) // For retina display or other situations where window coordinates are different from framebuffer coordinates. User storage only, presently not used by ImGui.
public ImVec2 DisplayVisibleMin; // <unset> (0.0f,0.0f) // If you use DisplaySize as a virtual space larger than your screen, set DisplayVisibleMin/Max to the visible area.
public ImVec2 DisplayVisibleMax; // <unset> (0.0f,0.0f) // If the values are the same, we defaults to Min=(0.0f) and Max=DisplaySize
//------------------------------------------------------------------
// User Functions
//------------------------------------------------------------------
// Rendering function, will be called in Render().
// Alternatively you can keep this to NULL and call GetDrawData() after Render() to get the same pointer.
// See example applications if you are unsure of how to implement this.
//public RenderDrawListsFn RenderFunction;
public IntPtr RenderDrawListsFn;
// Optional: access OS clipboard
// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures)
// const char* (*GetClipboardTextFn)();
public IntPtr GetClipboardTextFn;
// void (*SetClipboardTextFn)(const char* text);
public IntPtr SetClipboardTextFn;
// Optional: override memory allocations. MemFreeFn() may be called with a NULL pointer.
// (default to posix malloc/free)
// void* (*MemAllocFn)(size_t sz);
public IntPtr MemAllocFn;
// void (*MemFreeFn)(void* ptr);
public IntPtr MemFreeFn;
// Optional: notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME in Windows)
// (default to use native imm32 api on Windows)
//void (*ImeSetInputScreenPosFn)(int x, int y);
public IntPtr ImeSetInputScreenPosFn;
public IntPtr ImeWindowHandle; // (Windows) Set this to your HWND to get automatic IME cursor positioning.
//------------------------------------------------------------------
// Input - Fill before calling NewFrame()
//------------------------------------------------------------------
public ImVec2 MousePos; // Mouse position, in pixels (set to -1,-1 if no mouse / on another screen, etc.)
public fixed byte MouseDown[5]; // Mouse buttons: left, right, middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button). Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
public float MouseWheel; // Mouse wheel: 1 unit scrolls about 5 lines text.
public byte MouseDrawCursor; // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor).
public byte KeyCtrl; // Keyboard modifier pressed: Control
public byte KeyShift; // Keyboard modifier pressed: Shift
public byte KeyAlt; // Keyboard modifier pressed: Alt
public fixed byte KeysDown[512]; // Keyboard keys that are pressed (in whatever storage order you naturally have access to keyboard data)
public fixed ImWchar InputCharacters[16 + 1]; // List of characters input (translated by user from keypress+keyboard state). Fill using AddInputCharacter() helper.
// Functions
/*
IMGUI_API void AddInputCharacter(ImWchar c); // Helper to add a new character into InputCharacters[]
IMGUI_API void AddInputCharactersUTF8(const char* utf8_chars); // Helper to add new characters into InputCharacters[] from an UTF-8 string
*/
//------------------------------------------------------------------
// Output - Retrieve after calling NewFrame(), you can use them to discard inputs or hide them from the rest of your application
//------------------------------------------------------------------
public byte WantCaptureMouse; // Mouse is hovering a window or widget is active (= ImGui will use your mouse input)
public byte WantCaptureKeyboard; // Widget is active (= ImGui will use your keyboard input)
public byte WantTextInput; // Some text input widget is active, which will read input characters from the InputCharacters array.
public float Framerate; // Framerate estimation, in frame per second. Rolling average estimation based on IO.DeltaTime over 120 frames
public int MetricsAllocs; // Number of active memory allocations
public int MetricsRenderVertices; // Vertices output during last call to Render()
public int MetricsRenderIndices; // Indices output during last call to Render() = number of triangles * 3
public int MetricsActiveWindows; // Number of visible windows (exclude child windows)
//------------------------------------------------------------------
// [Internal] ImGui will maintain those fields for you
//------------------------------------------------------------------
public ImVec2 MousePosPrev; // Previous mouse position
public ImVec2 MouseDelta; // Mouse delta. Note that this is zero if either current or previous position are negative to allow mouse enabling/disabling.
public fixed byte MouseClicked[5]; // Mouse button went from !Down to Down
//fixed ImVec2 MouseClickedPos[5]; // Position at time of clicking
public ImVec2 MouseClickedPos0, MouseClickedPos1, MouseClickedPos2, MouseClickedPos3, MouseClickedPos4;
public fixed float MouseClickedTime[5]; // Time of last click (used to figure out double-click)
public fixed byte MouseDoubleClicked[5]; // Has mouse button been double-clicked?
public fixed byte MouseReleased[5]; // Mouse button went from Down to !Down
public fixed byte MouseDownOwned[5]; // Track if button was clicked inside a window. We don't request mouse capture from the application if click started outside ImGui bounds.
public fixed float MouseDownDuration[5]; // Duration the mouse button has been down (0.0f == just clicked)
public fixed float MouseDownDurationPrev[5]; // Previous time the mouse button has been down
public fixed float MouseDragMaxDistanceSqr[5]; // Squared maximum distance of how much mouse has traveled from the click point
public fixed float KeysDownDuration[512]; // Duration the keyboard key has been down (0.0f == just pressed)
public fixed float KeysDownDurationPrev[512]; // Previous duration the key has been down
/*
IMGUI_API ImGuiIO();
*/
}
public static class Constants
{
public const int intImGuiKey_Tab = 0; // for tabbing through fields
public const int ImGuiKey_LeftArrow = 1; // for text edit
public const int ImGuiKey_RightArrow = 2; // for text edit
public const int ImGuiKey_UpArrow = 3; // for text edit
public const int ImGuiKey_DownArrow = 4; // for text edit
public const int ImGuiKey_PageUp = 5;
public const int ImGuiKey_PageDown = 6;
public const int ImGuiKey_Home = 7; // for text edit
public const int ImGuiKey_End = 8; // for text edit
public const int ImGuiKey_Delete = 9; // for text edit
public const int ImGuiKey_Backspace = 10; // for text edit
public const int ImGuiKey_Enter = 11; // for text edit
public const int ImGuiKey_Escape = 12; // for text edit
public const int ImGuiKey_A = 13; // for text edit CTRL+A: select all
public const int ImGuiKey_C = 14; // for text edit CTRL+C: copy
public const int ImGuiKey_V = 15; // for text edit CTRL+V: paste
public const int ImGuiKey_X = 16; // for text edit CTRL+X: cut
public const int ImGuiKey_Y = 17; // for text edit CTRL+Y: redo
public const int ImGuiKey_Z = 18; // for text edit CTRL+Z: undo
public const int ImGuiKey_COUNT = 19;
public static class ImGuiCol
{
public const int ImGuiCol_Text = 0;
public const int ImGuiCol_TextDisabled = 1;
public const int ImGuiCol_WindowBg = 2;
public const int ImGuiCol_ChildWindowBg = 3;
public const int ImGuiCol_Border = 4;
public const int ImGuiCol_BorderShadow = 5;
public const int ImGuiCol_FrameBg = 6; // Background of checkbox = 0; radio button = 0; plot = 0; slider = 0; text input
public const int ImGuiCol_FrameBgHovered = 7;
public const int ImGuiCol_FrameBgActive = 8;
public const int ImGuiCol_TitleBg = 9;
public const int ImGuiCol_TitleBgCollapsed = 10;
public const int ImGuiCol_TitleBgActive = 11;
public const int ImGuiCol_MenuBarBg = 12;
public const int ImGuiCol_ScrollbarBg = 13;
public const int ImGuiCol_ScrollbarGrab = 14;
public const int ImGuiCol_ScrollbarGrabHovered = 15;
public const int ImGuiCol_ScrollbarGrabActive = 16;
public const int ImGuiCol_ComboBg = 17;
public const int ImGuiCol_CheckMark = 18;
public const int ImGuiCol_SliderGrab = 19;
public const int ImGuiCol_SliderGrabActive = 20;
public const int ImGuiCol_Button = 21;
public const int ImGuiCol_ButtonHovered = 22;
public const int ImGuiCol_ButtonActive = 23;
public const int ImGuiCol_Header = 24;
public const int ImGuiCol_HeaderHovered = 25;
public const int ImGuiCol_HeaderActive = 26;
public const int ImGuiCol_Column = 27;
public const int ImGuiCol_ColumnHovered = 28;
public const int ImGuiCol_ColumnActive = 29;
public const int ImGuiCol_ResizeGrip = 30;
public const int ImGuiCol_ResizeGripHovered = 31;
public const int ImGuiCol_ResizeGripActive = 32;
public const int ImGuiCol_CloseButton = 33;
public const int ImGuiCol_CloseButtonHovered = 34;
public const int ImGuiCol_CloseButtonActive = 35;
public const int ImGuiCol_PlotLines = 36;
public const int ImGuiCol_PlotLinesHovered = 37;
public const int ImGuiCol_PlotHistogram = 38;
public const int ImGuiCol_PlotHistogramHovered = 39;
public const int ImGuiCol_TextSelectedBg = 40;
public const int ImGuiCol_TooltipBg = 41;
public const int ImGuiCol_ModalWindowDarkening = 42; // darken entire screen when a modal window is active
public const int ImGuiCol_COUNT = 43;
}
}
}

@ -1,46 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ImVec2 = System.Numerics.Vector2;
using ImVec4 = System.Numerics.Vector4;
using ImGuiAlign = System.Int32;
using System.Runtime.InteropServices;
namespace ImGui
{
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImGuiStyle
{
float Alpha; // Global alpha applies to everything in ImGui
ImVec2 WindowPadding; // Padding within a window
ImVec2 WindowMinSize; // Minimum window size
float WindowRounding; // Radius of window corners rounding. Set to 0.0f to have rectangular windows
ImGuiAlign WindowTitleAlign; // Alignment for title bar text
float ChildWindowRounding; // Radius of child window corners rounding. Set to 0.0f to have rectangular windows
ImVec2 FramePadding; // Padding within a framed rectangle (used by most widgets)
float FrameRounding; // Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets).
ImVec2 ItemSpacing; // Horizontal and vertical spacing between widgets/lines
ImVec2 ItemInnerSpacing; // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label)
ImVec2 TouchExtraPadding; // Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
float WindowFillAlphaDefault; // Default alpha of window background, if not specified in ImGui::Begin()
float IndentSpacing; // Horizontal indentation when e.g. entering a tree node
float ColumnsMinSpacing; // Minimum horizontal spacing between two columns
float ScrollbarSize; // Width of the vertical scrollbar, Height of the horizontal scrollbar
float ScrollbarRounding; // Radius of grab corners for scrollbar
float GrabMinSize; // Minimum width/height of a grab box for slider/scrollbar
float GrabRounding; // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
ImVec2 DisplayWindowPadding; // Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.
ImVec2 DisplaySafeAreaPadding; // If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.
bool AntiAliasedLines; // Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU.
bool AntiAliasedShapes; // Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
float CurveTessellationTol; // Tessellation tolerance. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.
//fixed ImVec4 Colors[Constants.ImGuiCol.ImGuiCol_COUNT];
fixed float Colors[Constants.ImGuiCol.ImGuiCol_COUNT * 4];
/*
IMGUI_API ImGuiStyle();
*/
};
}

@ -1,36 +0,0 @@
using ImGuiInputTextFlags = System.Int32;
using ImWchar = System.UInt16;
using ImGuiKey = System.Int32;
using System.Runtime.InteropServices;
namespace ImGui
{
// Shared state of InputText(), passed to callback when a ImGuiInputTextFlags_Callback* flag is used.
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImGuiTextEditCallbackData
{
//ImGuiInputTextFlags EventFlag; // One of ImGuiInputTextFlags_Callback* // Read-only
//ImGuiInputTextFlags Flags; // What user passed to InputText() // Read-only
//IntPtr UserData; // What user passed to InputText() // Read-only
//bool ReadOnly; // Read-only mode // Read-only
//// CharFilter event:
//ImWchar EventChar; // Character input // Read-write (replace character or set to zero)
//// Completion,History,Always events:
//ImGuiKey EventKey; // Key pressed (Up/Down/TAB) // Read-only
//char* Buf; // Current text // Read-write (pointed data only)
//int BufSize; // // Read-only
bool BufDirty; // Must set if you modify Buf directly // Write
int CursorPos; // // Read-write
int SelectionStart; // // Read-write (== to SelectionEnd when no selection)
int SelectionEnd; // // Read-write
// NB: calling those function loses selection.
/*
void DeleteChars(int pos, int bytes_count);
void InsertChars(int pos, const char* text, const char* text_end = NULL);
bool HasSelection() const { return SelectionStart != SelectionEnd; }
*/
}
}

@ -1,16 +0,0 @@
using System;
using System.Runtime.InteropServices;
namespace ImGui
{
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct ImVector
{
//[MarshalAs(UnmanagedType.SysInt)]
public int Size;
//[MarshalAs(UnmanagedType.SysInt)]
public int Capacity;
///<summary>T* Data</summary>
public void* Data;
}
}

@ -1,778 +0,0 @@
using System.Runtime.InteropServices;
using System.Numerics;
using ImGuiWindowFlags = System.IntPtr;
using ImGuiSetCond = System.IntPtr;
using ImGuiColorEditMode = System.IntPtr;
using ImVec2 = System.Numerics.Vector2;
using ImVec4 = System.Numerics.Vector4;
using ImGuiID = System.UInt32;
using ImTextureID = System.IntPtr;
using System;
using ImGuiStoragePtr = System.IntPtr;
using ImGuiCol = System.Int32;
using ImGuiStyleVar = System.Int32;
using size_t = System.UIntPtr;
using ImGuiInputTextFlags = System.Int32;
using ImGuiTextEditCallback = System.Func<System.IntPtr, System.IntPtr>;
// typedef int (* ImGuiTextEditCallback)(ImGuiTextEditCallbackData* data);
using ImGuiSelectableFlags = System.Int32;
using ImU32 = System.UInt32;
using ImGuiMouseCursor = System.Int32;
using ImDrawIdx = System.UInt16;
namespace ImGui
{
internal static unsafe class Interop
{
private const string LibName = "cimgui";
[DllImport(LibName)]
internal static extern IntPtr igGetIO();
internal static ImGuiIO* GetIOPtr() { return (ImGuiIO*)igGetIO().ToPointer(); }
[DllImport(LibName)]
internal static extern ImGuiStyle* igGetStyle();
[DllImport(LibName)]
internal static extern IntPtr igGetDrawData();
internal static ImDrawData* GetDrawDataPtr()
{
return (ImDrawData*)igGetDrawData().ToPointer();
}
[DllImport(LibName)]
internal static extern void igNewFrame();
[DllImport(LibName)]
internal static extern void igRender();
[DllImport(LibName)]
internal static extern void igShutdown();
[DllImport(LibName)]
internal static extern void igShowUserGuide();
[DllImport(LibName)]
internal static extern void igShowStyleEditor(ImGuiStyle* @ref);
[DllImport(LibName)]
internal static extern void igShowTestWindow(bool* opened);
[DllImport(LibName)]
internal static extern void igShowMetricsWindow(bool* opened);
// Window
[DllImport(LibName)]
internal static extern bool igBegin(string name, bool* p_opened, ImGuiWindowFlags flags);
[DllImport(LibName)]
internal static extern bool igBegin2(string name, bool* p_opened, ImVec2 size_on_first_use, float bg_alpha, ImGuiWindowFlags flags);
[DllImport(LibName)]
internal static extern void igEnd();
[DllImport(LibName)]
internal static extern bool igBeginChild(string str_id, ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
[DllImport(LibName)]
internal static extern bool igBeginChildEx(ImGuiID id, ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
[DllImport(LibName)]
internal static extern void igEndChild();
[DllImport(LibName)]
internal static extern void igGetContentRegionMax(ImVec2* @out);
[DllImport(LibName)]
internal static extern void igGetContentRegionAvail(ImVec2* @out);
[DllImport(LibName)]
internal static extern float igGetContentRegionAvailWidth(); //
[DllImport(LibName)]
internal static extern void igGetWindowContentRegionMin(ImVec2* @out);
[DllImport(LibName)]
internal static extern void igGetWindowContentRegionMax(ImVec2* @out);
[DllImport(LibName)]
internal static extern float igGetWindowContentRegionWidth(); //
[DllImport(LibName)]
internal static extern ImDrawList* igGetWindowDrawList();
[DllImport(LibName)]
internal static extern ImFont* igGetWindowFont();
[DllImport(LibName)]
internal static extern float igGetWindowFontSize();
[DllImport(LibName)]
internal static extern void igSetWindowFontScale(float scale);
[DllImport(LibName)]
internal static extern void igGetWindowPos(ImVec2* @out);
[DllImport(LibName)]
internal static extern void igGetWindowSize(ImVec2* @out);
[DllImport(LibName)]
internal static extern float igGetWindowWidth();
[DllImport(LibName)]
internal static extern float igGetWindowHeight();
[DllImport(LibName)]
internal static extern bool igIsWindowCollapsed();
[DllImport(LibName)]
internal static extern void igSetNextWindowPos(ImVec2 pos, ImGuiSetCond cond);
[DllImport(LibName)]
internal static extern void igSetNextWindowPosCenter(ImGuiSetCond cond);
[DllImport(LibName)]
internal static extern void igSetNextWindowSize(ImVec2 size, ImGuiSetCond cond);
[DllImport(LibName)]
internal static extern void igSetNextWindowContentSize(ImVec2 size);
[DllImport(LibName)]
internal static extern void igSetNextWindowContentWidth(float width);
[DllImport(LibName)]
internal static extern void igSetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond);
[DllImport(LibName)]
internal static extern void igSetNextWindowFocus();
[DllImport(LibName)]
internal static extern void igSetWindowPos(ImVec2 pos, ImGuiSetCond cond);
[DllImport(LibName)]
internal static extern void igSetWindowSize(ImVec2 size, ImGuiSetCond cond);
[DllImport(LibName)]
internal static extern void igSetWindowCollapsed(bool collapsed, ImGuiSetCond cond);
[DllImport(LibName)]
internal static extern void igSetWindowFocus();
[DllImport(LibName)]
internal static extern void igSetWindowPosByName(string name, ImVec2 pos, ImGuiSetCond cond);
[DllImport(LibName)]
internal static extern void igSetWindowSize2(string name, ImVec2 size, ImGuiSetCond cond);
[DllImport(LibName)]
internal static extern void igSetWindowCollapsed2(string name, bool collapsed, ImGuiSetCond cond);
[DllImport(LibName)]
internal static extern void igSetWindowFocus2(string name);
[DllImport(LibName)]
internal static extern float igGetScrollX();
[DllImport(LibName)]
internal static extern float igGetScrollY();
[DllImport(LibName)]
internal static extern float igGetScrollMaxX();
[DllImport(LibName)]
internal static extern float igGetScrollMaxY();
[DllImport(LibName)]
internal static extern void igSetScrollX(float scroll_x);
[DllImport(LibName)]
internal static extern void igSetScrollY(float scroll_y);
[DllImport(LibName)]
internal static extern void igSetScrollHere(float center_y_ratio = 0.5f);
[DllImport(LibName)]
internal static extern void igSetScrollFromPosY(float pos_y, float center_y_ratio = 0.5f);
[DllImport(LibName)]
internal static extern void igSetKeyboardFocusHere(int offset);
[DllImport(LibName)]
//internal static extern void igSetStateStorage(ImGuiStorage* tree);
internal static extern void igSetStateStorage(ImGuiStoragePtr tree);
[DllImport(LibName)]
internal static extern ImGuiStoragePtr* igGetStateStorage();
// Parameters stacks (shared)
[DllImport(LibName)]
internal static extern void igPushFont(ImFont* font);
[DllImport(LibName)]
internal static extern void igPopFont();
[DllImport(LibName)]
internal static extern void igPushStyleColor(ImGuiCol idx, ImVec4 col);
[DllImport(LibName)]
internal static extern void igPopStyleColor(int count);
[DllImport(LibName)]
internal static extern void igPushStyleVar(ImGuiStyleVar idx, float val);
[DllImport(LibName)]
internal static extern void igPushStyleVarVec(ImGuiStyleVar idx, ImVec2 val);
[DllImport(LibName)]
internal static extern void igPopStyleVar(int count);
// Parameters stacks (current window)
[DllImport(LibName)]
internal static extern void igPushItemWidth(float item_width);
[DllImport(LibName)]
internal static extern void igPopItemWidth();
[DllImport(LibName)]
internal static extern float igCalcItemWidth();
[DllImport(LibName)]
internal static extern void igPushTextWrapPos(float wrap_pos_x);
[DllImport(LibName)]
internal static extern void igPopTextWrapPos();
[DllImport(LibName)]
internal static extern void igPushAllowKeyboardFocus(bool v);
[DllImport(LibName)]
internal static extern void igPopAllowKeyboardFocus();
[DllImport(LibName)]
internal static extern void igPushButtonRepeat(bool repeat);
[DllImport(LibName)]
internal static extern void igPopButtonRepeat();
// Layout
[DllImport(LibName)]
internal static extern void igBeginGroup();
[DllImport(LibName)]
internal static extern void igEndGroup();
[DllImport(LibName)]
internal static extern void igSeparator();
[DllImport(LibName)]
internal static extern void igSameLine(float local_pos_x, float spacing_w);
[DllImport(LibName)]
internal static extern void igSpacing();
[DllImport(LibName)]
internal static extern void igDummy(ImVec2* size);
[DllImport(LibName)]
internal static extern void igIndent();
[DllImport(LibName)]
internal static extern void igUnindent();
[DllImport(LibName)]
internal static extern void igColumns(int count, string id, bool border);
[DllImport(LibName)]
internal static extern void igNextColumn();
[DllImport(LibName)]
internal static extern int igGetColumnIndex();
[DllImport(LibName)]
internal static extern float igGetColumnOffset(int column_index);
[DllImport(LibName)]
internal static extern void igSetColumnOffset(int column_index, float offset_x);
[DllImport(LibName)]
internal static extern float igGetColumnWidth(int column_index);
[DllImport(LibName)]
internal static extern int igGetColumnsCount();
[DllImport(LibName)]
internal static extern void igGetCursorPos(ImVec2* pOut);
[DllImport(LibName)]
internal static extern float igGetCursorPosX();
[DllImport(LibName)]
internal static extern float igGetCursorPosY();
[DllImport(LibName)]
internal static extern void igSetCursorPos(ImVec2 local_pos);
[DllImport(LibName)]
internal static extern void igSetCursorPosX(float x);
[DllImport(LibName)]
internal static extern void igSetCursorPosY(float y);
[DllImport(LibName)]
internal static extern void igGetCursorStartPos(ImVec2* pOut);
[DllImport(LibName)]
internal static extern void igGetCursorScreenPos(ImVec2* pOut);
[DllImport(LibName)]
internal static extern void igSetCursorScreenPos(ImVec2 pos);
[DllImport(LibName)]
internal static extern void igAlignFirstTextHeightToWidgets();
[DllImport(LibName)]
internal static extern float igGetTextLineHeight();
[DllImport(LibName)]
internal static extern float igGetTextLineHeightWithSpacing();
[DllImport(LibName)]
internal static extern float igGetItemsLineHeightWithSpacing();
// ID scopes
// If you are creating widgets @in a loop you most likely want to push a unique identifier so ImGui can differentiate them
// You can also use "##extra" within your widget name to distinguish them from each others (see 'Programmer Guide')
[DllImport(LibName)]
internal static extern void igPushIdStr(string str_id);
[DllImport(LibName)]
internal static extern void igPushIdStrRange(string str_begin, string str_end);
[DllImport(LibName)]
internal static extern void igPushIdPtr(void* ptr_id);
[DllImport(LibName)]
internal static extern void igPushIdInt(int int_id);
[DllImport(LibName)]
internal static extern void igPopId();
[DllImport(LibName)]
internal static extern ImGuiID igGetIdStr(string str_id);
[DllImport(LibName)]
internal static extern ImGuiID igGetIdStrRange(string str_begin, string str_end);
[DllImport(LibName)]
internal static extern ImGuiID igGetIdPtr(void* ptr_id);
// Widgets
[DllImport(LibName)]
//internal static extern void igText(string fmt, ...);
internal static extern void igText(string fmt);
/*
[DllImport(LibName)]
internal static extern void igTextV(string fmt, va_list args);
*/
[DllImport(LibName)]
//internal static extern void igTextColored(ImVec4 col, string fmt, ...);
internal static extern void igTextColored(ImVec4 col, string fmt);
/*
[DllImport(LibName)]
internal static extern void igTextColoredV(ImVec4 col, string fmt, va_list args);
*/
[DllImport(LibName)]
//internal static extern void igTextDisabled(string fmt, ...);
internal static extern void igTextDisabled(string fmt);
/*
[DllImport(LibName)]
internal static extern void igTextDisabledV(string fmt, va_list args);
*/
[DllImport(LibName)]
//internal static extern void igTextWrapped(string fmt, ...);
internal static extern void igTextWrapped(string fmt);
/*
[DllImport(LibName)]
internal static extern void igTextWrappedV(string fmt, va_list args);
*/
[DllImport(LibName)]
internal static extern void igTextUnformatted(string text, string text_end);
[DllImport(LibName)]
//internal static extern void igLabelText(string label, string fmt, ...);
internal static extern void igLabelText(string label, string fmt);
/*
[DllImport(LibName)]
internal static extern void igLabelTextV(string label, string fmt, va_list args);
*/
[DllImport(LibName)]
internal static extern void igBullet();
[DllImport(LibName)]
//internal static extern void igBulletText(string fmt, ...);
internal static extern void igBulletText(string fmt);
/*
[DllImport(LibName)]
internal static extern void igBulletTextV(string fmt, va_list args);
*/
[DllImport(LibName)]
internal static extern bool igButton(string label, ImVec2 size);
[DllImport(LibName)]
internal static extern bool igSmallButton(string label);
[DllImport(LibName)]
internal static extern bool igInvisibleButton(string str_id, ImVec2 size);
[DllImport(LibName)]
internal static extern void igImage(ImTextureID user_texture_id, ImVec2 size, ImVec2 uv0, ImVec2 uv1, ImVec4 tint_col, ImVec4 border_col);
[DllImport(LibName)]
internal static extern bool igImageButton(ImTextureID user_texture_id, ImVec2 size, ImVec2 uv0, ImVec2 uv1, int frame_padding, ImVec4 bg_col, ImVec4 tint_col);
[DllImport(LibName)]
internal static extern bool igCollapsingHeader(string label, string str_id, bool display_frame, bool default_open);
[DllImport(LibName)]
internal static extern bool igCheckbox(string label, bool* v);
[DllImport(LibName)]
internal static extern bool igCheckboxFlags(string label, UIntPtr* flags, uint flags_value);
[DllImport(LibName)]
internal static extern bool igRadioButtonBool(string label, bool active);
[DllImport(LibName)]
internal static extern bool igRadioButton(string label, int* v, int v_button);
[DllImport(LibName)]
internal static extern bool igCombo(string label, int* current_item, char** items, int items_count, int height_in_items);
[DllImport(LibName)]
internal static extern bool igCombo2(string label, int* current_item, string items_separated_by_zeros, int height_in_items);
/*
[DllImport(LibName)]
internal static extern bool igCombo3(string label, int* current_item, bool(*items_getter)(void* data, int idx, string* out_text), void* data, int items_count, int height_in_items);
*/
[DllImport(LibName)]
internal static extern bool igColorButton(ImVec4 col, bool small_height, bool outline_border);
[DllImport(LibName)]
internal static extern bool igColorEdit3(string label, Vector3 col);
[DllImport(LibName)]
internal static extern bool igColorEdit4(string label, Vector4 col, bool show_alpha);
[DllImport(LibName)]
internal static extern void igColorEditMode(ImGuiColorEditMode mode);
[DllImport(LibName)]
internal static extern void igPlotLines(string label, float* values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, ImVec2 graph_size, int stride);
/*
[DllImport(LibName)]
internal static extern void igPlotLines2(string label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, ImVec2 graph_size);
*/
[DllImport(LibName)]
internal static extern void igPlotHistogram(string label, float* values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, ImVec2 graph_size, int stride);
/*
[DllImport(LibName)]
internal static extern void igPlotHistogram2(string label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, ImVec2 graph_size);
*/
// Widgets: Sliders (tip: ctrl+click on a slider to input text)
[DllImport(LibName)]
internal static extern bool igSliderFloat(string label, float* v, float v_min, float v_max, string display_format, float power);
[DllImport(LibName)]
internal static extern bool igSliderFloat2(string label, Vector2 v, float v_min, float v_max, string display_format, float power);
[DllImport(LibName)]
internal static extern bool igSliderFloat3(string label, Vector3 v, float v_min, float v_max, string display_format, float power);
[DllImport(LibName)]
internal static extern bool igSliderFloat4(string label, Vector4 v, float v_min, float v_max, string display_format, float power);
[DllImport(LibName)]
internal static extern bool igSliderAngle(string label, float* v_rad, float v_degrees_min, float v_degrees_max);
[DllImport(LibName)]
internal static extern bool igSliderInt(string label, int* v, int v_min, int v_max, string display_format);
[DllImport(LibName)]
internal static extern bool igSliderInt2(string label, Int2 v, int v_min, int v_max, string display_format);
[DllImport(LibName)]
internal static extern bool igSliderInt3(string label, Int3 v, int v_min, int v_max, string display_format);
[DllImport(LibName)]
internal static extern bool igSliderInt4(string label, Int4 v, int v_min, int v_max, string display_format);
[DllImport(LibName)]
internal static extern bool igVSliderFloat(string label, ImVec2 size, float* v, float v_min, float v_max, string display_format, float power);
[DllImport(LibName)]
internal static extern bool igVSliderInt(string label, ImVec2 size, int* v, int v_min, int v_max, string display_format);
// Widgets: Drags (tip: ctrl+click on a drag box to input text)
[DllImport(LibName)]
internal static extern bool igDragFloat(string label, float* v, float v_speed, float v_min, float v_max, string display_format, float power); // If v_max >= v_max we have no bound
[DllImport(LibName)]
internal static extern bool igDragFloat2(string label, Vector2 v, float v_speed, float v_min, float v_max, string display_format, float power);
[DllImport(LibName)]
internal static extern bool igDragFloat3(string label, Vector3 v, float v_speed, float v_min, float v_max, string display_format, float power);
[DllImport(LibName)]
internal static extern bool igDragFloat4(string label, Vector4 v, float v_speed, float v_min, float v_max, string display_format, float power);
[DllImport(LibName)]
internal static extern bool igDragFloatRange2(string label, float* v_current_min, float* v_current_max, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, string display_format = "%.3f", string display_format_max = null, float power = 1.0f);
[DllImport(LibName)]
internal static extern bool igDragInt(string label, int* v, float v_speed, int v_min, int v_max, string display_format); // If v_max >= v_max we have no bound
[DllImport(LibName)]
internal static extern bool igDragInt2(string label, Int2 v, float v_speed, int v_min, int v_max, string display_format);
[DllImport(LibName)]
internal static extern bool igDragInt3(string label, Int3 v, float v_speed, int v_min, int v_max, string display_format);
[DllImport(LibName)]
internal static extern bool igDragInt4(string label, Int4 v, float v_speed, int v_min, int v_max, string display_format);
[DllImport(LibName)]
internal static extern bool igDragIntRange2(string label, int* v_current_min, int* v_current_max, float v_speed = 1.0f, int v_min = 0, int v_max = 0, string display_format = "%.0f", string display_format_max = null);
// Widgets: Input
[DllImport(LibName)]
internal static extern bool igInputText(string label, string buf, size_t buf_size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data);
[DllImport(LibName)]
internal static extern bool igInputTextMultiline(string label, string buf, size_t buf_size, ImVec2 size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data);
[DllImport(LibName)]
internal static extern bool igInputFloat(string label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags extra_flags);
[DllImport(LibName)]
internal static extern bool igInputFloat2(string label, Vector2 v, int decimal_precision, ImGuiInputTextFlags extra_flags);
[DllImport(LibName)]
internal static extern bool igInputFloat3(string label, Vector3 v, int decimal_precision, ImGuiInputTextFlags extra_flags);
[DllImport(LibName)]
internal static extern bool igInputFloat4(string label, Vector4 v, int decimal_precision, ImGuiInputTextFlags extra_flags);
[DllImport(LibName)]
internal static extern bool igInputInt(string label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags);
[DllImport(LibName)]
internal static extern bool igInputInt2(string label, Int2 v, ImGuiInputTextFlags extra_flags);
[DllImport(LibName)]
internal static extern bool igInputInt3(string label, Int3 v, ImGuiInputTextFlags extra_flags);
[DllImport(LibName)]
internal static extern bool igInputInt4(string label, Int4 v, ImGuiInputTextFlags extra_flags);
// Widgets: Trees
[DllImport(LibName)]
internal static extern bool igTreeNode(string str_label_id);
[DllImport(LibName)]
//internal static extern bool igTreeNodeStr(string str_id, string fmt, ...);
internal static extern bool igTreeNodeStr(string str_id, string fmt);
[DllImport(LibName)]
//internal static extern bool igTreeNodePtr(void* ptr_id, string fmt, ...);
internal static extern bool igTreeNodePtr(void* ptr_id, string fmt);
/*
[DllImport(LibName)]
internal static extern bool igTreeNodeStrV(string str_id, string fmt, va_list args);
[DllImport(LibName)]
internal static extern bool igTreeNodePtrV(void* ptr_id, string fmt, va_list args);
*/
[DllImport(LibName)]
internal static extern void igTreePushStr(string str_id);
[DllImport(LibName)]
internal static extern void igTreePushPtr(void* ptr_id);
[DllImport(LibName)]
internal static extern void igTreePop();
[DllImport(LibName)]
internal static extern void igSetNextTreeNodeOpened(bool opened, ImGuiSetCond cond);
// Widgets: Selectable / Lists
[DllImport(LibName)]
internal static extern bool igSelectable(string label, bool selected, ImGuiSelectableFlags flags, ImVec2 size);
[DllImport(LibName)]
internal static extern bool igSelectableEx(string label, bool* p_selected, ImGuiSelectableFlags flags, ImVec2 size);
[DllImport(LibName)]
internal static extern bool igListBox(string label, int* current_item, char** items, int items_count, int height_in_items);
/*
[DllImport(LibName)]
internal static extern bool igListBox2(string label, int* current_item, bool(*items_getter)(void* data, int idx, string* out_text), void* data, int items_count, int height_in_items);
*/
[DllImport(LibName)]
internal static extern bool igListBoxHeader(string label, ImVec2 size);
[DllImport(LibName)]
internal static extern bool igListBoxHeader2(string label, int items_count, int height_in_items);
[DllImport(LibName)]
internal static extern void igListBoxFooter();
// Widgets: Value() Helpers. Output single value @in "name: value" format (tip: freely declare your own within the ImGui namespace!)
[DllImport(LibName)]
internal static extern void igValueBool(string prefix, bool b);
[DllImport(LibName)]
internal static extern void igValueInt(string prefix, int v);
[DllImport(LibName)]
internal static extern void igValueUInt(string prefix, uint v);
[DllImport(LibName)]
internal static extern void igValueFloat(string prefix, float v, string float_format);
[DllImport(LibName)]
internal static extern void igColor(string prefix, ImVec4 v);
[DllImport(LibName)]
internal static extern void igColor2(string prefix, uint v);
// Tooltip
[DllImport(LibName)]
//internal static extern void igSetTooltip(string fmt, ...);
internal static extern void igSetTooltip(string fmt);
/*
[DllImport(LibName)]
internal static extern void igSetTooltipV(string fmt, va_list args);
*/
[DllImport(LibName)]
internal static extern void igBeginTooltip();
[DllImport(LibName)]
internal static extern void igEndTooltip();
// Widgets: Menus
[DllImport(LibName)]
internal static extern bool igBeginMainMenuBar();
[DllImport(LibName)]
internal static extern void igEndMainMenuBar();
[DllImport(LibName)]
internal static extern bool igBeginMenuBar();
[DllImport(LibName)]
internal static extern void igEndMenuBar();
[DllImport(LibName)]
internal static extern bool igBeginMenu(string label, bool enabled);
[DllImport(LibName)]
internal static extern void igEndMenu();
[DllImport(LibName)]
internal static extern bool igMenuItem(string label, string shortcut, bool selected, bool enabled);
[DllImport(LibName)]
internal static extern bool igMenuItemPtr(string label, string shortcut, bool* p_selected, bool enabled);
// Popup
[DllImport(LibName)]
internal static extern void igOpenPopup(string str_id);
[DllImport(LibName)]
internal static extern bool igBeginPopup(string str_id);
[DllImport(LibName)]
internal static extern bool igBeginPopupModal(string name, bool* p_opened, ImGuiWindowFlags extra_flags);
[DllImport(LibName)]
internal static extern bool igBeginPopupContextItem(string str_id, int mouse_button);
[DllImport(LibName)]
internal static extern bool igBeginPopupContextWindow(bool also_over_items, string str_id, int mouse_button);
[DllImport(LibName)]
internal static extern bool igBeginPopupContextVoid(string str_id, int mouse_button);
[DllImport(LibName)]
internal static extern void igEndPopup();
[DllImport(LibName)]
internal static extern void igCloseCurrentPopup();
// Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened.
[DllImport(LibName)]
internal static extern void igLogToTTY(int max_depth);
[DllImport(LibName)]
internal static extern void igLogToFile(int max_depth, string filename);
[DllImport(LibName)]
internal static extern void igLogToClipboard(int max_depth);
[DllImport(LibName)]
internal static extern void igLogFinish();
[DllImport(LibName)]
internal static extern void igLogButtons();
[DllImport(LibName)]
//internal static extern void igLogText(string fmt, ...);
internal static extern void igLogText(string fmt);
// Utilities
[DllImport(LibName)]
internal static extern bool igIsItemHovered();
[DllImport(LibName)]
internal static extern bool igIsItemHoveredRect();
[DllImport(LibName)]
internal static extern bool igIsItemActive();
[DllImport(LibName)]
internal static extern bool igIsItemVisible();
[DllImport(LibName)]
internal static extern bool igIsAnyItemHovered();
[DllImport(LibName)]
internal static extern bool igIsAnyItemActive();
[DllImport(LibName)]
internal static extern void igGetItemRectMin(ImVec2* pOut);
[DllImport(LibName)]
internal static extern void igGetItemRectMax(ImVec2* pOut);
[DllImport(LibName)]
internal static extern void igGetItemRectSize(ImVec2* pOut);
[DllImport(LibName)]
internal static extern bool igIsWindowHovered();
[DllImport(LibName)]
internal static extern bool igIsWindowFocused();
[DllImport(LibName)]
internal static extern bool igIsRootWindowFocused();
[DllImport(LibName)]
internal static extern bool igIsRootWindowOrAnyChildFocused();
[DllImport(LibName)]
internal static extern bool igIsRectVisible(ImVec2 item_size);
[DllImport(LibName)]
internal static extern bool igIsPosHoveringAnyWindow(ImVec2 pos);
[DllImport(LibName)]
internal static extern float igGetTime();
[DllImport(LibName)]
internal static extern int igGetFrameCount();
[DllImport(LibName)]
internal static extern string igGetStyleColName(ImGuiCol idx);
[DllImport(LibName)]
internal static extern void igCalcItemRectClosestPoint(ImVec2* pOut, ImVec2 pos, bool on_edge, float outward);
[DllImport(LibName)]
internal static extern void igCalcTextSize(ImVec2* pOut, string text, string text_end, bool hide_text_after_double_hash, float wrap_width);
[DllImport(LibName)]
internal static extern void igCalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);
[DllImport(LibName)]
internal static extern bool igBeginChildFrame(ImGuiID id, ImVec2 size, ImGuiWindowFlags extra_flags);
[DllImport(LibName)]
internal static extern void igEndChildFrame();
[DllImport(LibName)]
internal static extern void igColorConvertU32ToFloat4(ImVec4* pOut, ImU32 @in);
[DllImport(LibName)]
internal static extern ImU32 igColorConvertFloat4ToU32(ImVec4 @in);
[DllImport(LibName)]
internal static extern void igColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v);
[DllImport(LibName)]
internal static extern void igColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b);
[DllImport(LibName)]
internal static extern bool igIsKeyDown(int key_index);
[DllImport(LibName)]
internal static extern bool igIsKeyPressed(int key_index, bool repeat);
[DllImport(LibName)]
internal static extern bool igIsKeyReleased(int key_index);
[DllImport(LibName)]
internal static extern bool igIsMouseDown(int button);
[DllImport(LibName)]
internal static extern bool igIsMouseClicked(int button, bool repeat);
[DllImport(LibName)]
internal static extern bool igIsMouseDoubleClicked(int button);
[DllImport(LibName)]
internal static extern bool igIsMouseReleased(int button);
[DllImport(LibName)]
internal static extern bool igIsMouseHoveringWindow();
[DllImport(LibName)]
internal static extern bool igIsMouseHoveringAnyWindow();
[DllImport(LibName)]
internal static extern bool igIsMouseHoveringRect(ImVec2 pos_min, ImVec2 pos_max, bool clip);
[DllImport(LibName)]
internal static extern bool igIsMouseDragging(int button, float lock_threshold);
[DllImport(LibName)]
internal static extern void igGetMousePos(ImVec2* pOut);
[DllImport(LibName)]
internal static extern void igGetMousePosOnOpeningCurrentPopup(ImVec2* pOut);
[DllImport(LibName)]
internal static extern void igGetMouseDragDelta(ImVec2* pOut, int button, float lock_threshold);
[DllImport(LibName)]
internal static extern void igResetMouseDragDelta(int button);
[DllImport(LibName)]
internal static extern ImGuiMouseCursor igGetMouseCursor();
[DllImport(LibName)]
internal static extern void igSetMouseCursor(ImGuiMouseCursor type);
[DllImport(LibName)]
internal static extern void igCaptureKeyboardFromApp();
[DllImport(LibName)]
internal static extern void igCaptureMouseFromApp();
// Helpers functions to access functions pointers @in ImGui::GetIO()
[DllImport(LibName)]
internal static extern void* igMemAlloc(size_t sz);
[DllImport(LibName)]
internal static extern void igMemFree(void* ptr);
[DllImport(LibName)]
internal static extern string igGetClipboardText();
[DllImport(LibName)]
internal static extern void igSetClipboardText(string text);
// Internal state access - if you want to share ImGui state between modules (e.g. DLL) or allocate it yourself
[DllImport(LibName)]
internal static extern string igGetVersion();
[DllImport(LibName)]
internal static extern void* igGetInternalState();
[DllImport(LibName)]
internal static extern size_t igGetInternalStateSize();
[DllImport(LibName)]
internal static extern void igSetInternalState(void* state, bool construct);
[DllImport(LibName)]
internal static extern void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* atlas, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel);
[DllImport(LibName)]
internal static extern void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* atlas, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel);
[DllImport(LibName)]
internal static extern void ImFontAtlas_SetTexID(ImFontAtlas* atlas, void* tex);
/*
[DllImport(LibName)]
internal static extern ImFont* ImFontAtlas_AddFont(ImFontAtlas* atlas, ImFontConfig* font_cfg);
*/
[DllImport(LibName)]
internal static extern ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas, IntPtr font_cfg);
/*
[DllImport(LibName)]
internal static extern ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas, string filename, float size_pixels, ImFontConfig* font_cfg, ImWstring glyph_ranges);
[DllImport(LibName)]
internal static extern ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* ttf_data, int ttf_size, float size_pixels, ImFontConfig* font_cfg, ImWstring glyph_ranges);
[DllImport(LibName)]
internal static extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, ImFontConfig* font_cfg, ImWstring glyph_ranges);
[DllImport(LibName)]
internal static extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* atlas, string compressed_ttf_data_base85, float size_pixels, ImFontConfig* font_cfg, ImWstring glyph_ranges);
*/
[DllImport(LibName)]
internal static extern void ImFontAtlas_ClearTexData(ImFontAtlas* atlas);
[DllImport(LibName)]
internal static extern void ImFontAtlas_Clear(ImFontAtlas* atlas);
[DllImport(LibName)]
internal static extern void ImGuiIO_AddInputCharacter(ushort c);
[DllImport(LibName)]
internal static extern void ImGuiIO_AddInputCharactersUTF8(string utf8_chars);
[DllImport(LibName)]
internal static extern int ImDrawList_GetVertexBufferSize(ImDrawList* list);
[DllImport(LibName)]
internal static extern ImDrawVert* ImDrawList_GetVertexPtr(ImDrawList* list, int n);
[DllImport(LibName)]
internal static extern int ImDrawList_GetIndexBufferSize(ImDrawList* list);
[DllImport(LibName)]
internal static extern ImDrawIdx* ImDrawList_GetIndexPtr(ImDrawList* list, int n);
[DllImport(LibName)]
internal static extern int ImDrawList_GetCmdSize(ImDrawList* list);
[DllImport(LibName)]
internal static extern ImDrawCmd* ImDrawList_GetCmdPtr(ImDrawList* list, int n);
[DllImport(LibName)]
internal static extern void ImDrawData_DeIndexAllBuffers(ImDrawData* drawData);
}
[StructLayout(LayoutKind.Sequential)]
internal struct Int2
{
public readonly int X, Y;
}
[StructLayout(LayoutKind.Sequential)]
internal struct Int3
{
public readonly int X, Y, Z;
}
[StructLayout(LayoutKind.Sequential)]
internal struct Int4
{
public readonly int X, Y, Z, W;
}
}

@ -2,13 +2,14 @@
"dependencies": {
"Microsoft.NETCore.Console": "1.0.0-beta-23430",
"System.Console": "4.0.0-beta-23430",
"System.Reflection.Metadata": "1.1.1-beta-23430",
"System.Threading.Thread": "4.0.0-beta-23430"
},
"runtimes": {
"win10-x64": { },
"ubuntu.14.04-x64": { }
"win10-x64": {},
"ubuntu.14.04-x64": {}
},
"frameworks": {
"dnxcore50": { }
"dnxcore50": {}
}
}
Loading…
Cancel
Save