mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-26 16:18:55 +00:00
IO: Added GetPlatformIO(), ImGuiPlatformIO, currently empty.
This commit is contained in:
16
imgui.cpp
16
imgui.cpp
@@ -63,7 +63,7 @@ CODE
|
||||
// [SECTION] INCLUDES
|
||||
// [SECTION] FORWARD DECLARATIONS
|
||||
// [SECTION] CONTEXT AND MEMORY ALLOCATORS
|
||||
// [SECTION] USER FACING STRUCTURES (ImGuiStyle, ImGuiIO)
|
||||
// [SECTION] USER FACING STRUCTURES (ImGuiStyle, ImGuiIO, ImGuiPlatformIO)
|
||||
// [SECTION] MISC HELPERS/UTILITIES (Geometry functions)
|
||||
// [SECTION] MISC HELPERS/UTILITIES (String, Format, Hash functions)
|
||||
// [SECTION] MISC HELPERS/UTILITIES (File functions)
|
||||
@@ -1244,7 +1244,7 @@ static ImGuiMemFreeFunc GImAllocatorFreeFunc = FreeWrapper;
|
||||
static void* GImAllocatorUserData = NULL;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] USER FACING STRUCTURES (ImGuiStyle, ImGuiIO)
|
||||
// [SECTION] USER FACING STRUCTURES (ImGuiStyle, ImGuiIO, ImGuiPlatformIO)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ImGuiStyle::ImGuiStyle()
|
||||
@@ -1762,6 +1762,12 @@ void ImGuiIO::AddFocusEvent(bool focused)
|
||||
g.InputEventsQueue.push_back(e);
|
||||
}
|
||||
|
||||
ImGuiPlatformIO::ImGuiPlatformIO()
|
||||
{
|
||||
// Most fields are initialized with zero
|
||||
memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] MISC HELPERS/UTILITIES (Geometry functions)
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -4461,6 +4467,12 @@ ImGuiIO& ImGui::GetIO()
|
||||
return GImGui->IO;
|
||||
}
|
||||
|
||||
ImGuiPlatformIO& ImGui::GetPlatformIO()
|
||||
{
|
||||
IM_ASSERT(GImGui != NULL && "No current context. Did you call ImGui::CreateContext() and ImGui::SetCurrentContext()?");
|
||||
return GImGui->PlatformIO;
|
||||
}
|
||||
|
||||
// Pass this to your backend rendering function! Valid after Render() and until the next call to NewFrame()
|
||||
ImDrawData* ImGui::GetDrawData()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user