diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp index 8b04feb..1713bd5 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp @@ -7,7 +7,7 @@ // GL3W/GLFW #include #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -253,7 +253,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfwGL3_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfwGL3_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfwGL3_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp index 8b04feb..1713bd5 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp @@ -7,7 +7,7 @@ // GL3W/GLFW #include #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -253,7 +253,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfwGL3_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfwGL3_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfwGL3_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/opengl_example/imgui_impl_glfw.cpp b/examples/opengl_example/imgui_impl_glfw.cpp index 8338091..331c777 100644 --- a/examples/opengl_example/imgui_impl_glfw.cpp +++ b/examples/opengl_example/imgui_impl_glfw.cpp @@ -6,7 +6,7 @@ // GLFW #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -198,7 +198,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfw_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp index 8b04feb..1713bd5 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp @@ -7,7 +7,7 @@ // GL3W/GLFW #include #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -253,7 +253,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfwGL3_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfwGL3_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfwGL3_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/opengl_example/imgui_impl_glfw.cpp b/examples/opengl_example/imgui_impl_glfw.cpp index 8338091..331c777 100644 --- a/examples/opengl_example/imgui_impl_glfw.cpp +++ b/examples/opengl_example/imgui_impl_glfw.cpp @@ -6,7 +6,7 @@ // GLFW #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -198,7 +198,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfw_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/sdl_opengl_example/imgui_impl_sdl.cpp b/examples/sdl_opengl_example/imgui_impl_sdl.cpp index 980b11d..2392014 100644 --- a/examples/sdl_opengl_example/imgui_impl_sdl.cpp +++ b/examples/sdl_opengl_example/imgui_impl_sdl.cpp @@ -198,7 +198,7 @@ io.SetClipboardTextFn = ImGui_ImplSdl_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplSdl_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 SDL_SysWMinfo wmInfo; SDL_VERSION(&wmInfo.version); SDL_GetWindowWMInfo(window, &wmInfo); diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp index 8b04feb..1713bd5 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp @@ -7,7 +7,7 @@ // GL3W/GLFW #include #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -253,7 +253,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfwGL3_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfwGL3_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfwGL3_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/opengl_example/imgui_impl_glfw.cpp b/examples/opengl_example/imgui_impl_glfw.cpp index 8338091..331c777 100644 --- a/examples/opengl_example/imgui_impl_glfw.cpp +++ b/examples/opengl_example/imgui_impl_glfw.cpp @@ -6,7 +6,7 @@ // GLFW #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -198,7 +198,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfw_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/sdl_opengl_example/imgui_impl_sdl.cpp b/examples/sdl_opengl_example/imgui_impl_sdl.cpp index 980b11d..2392014 100644 --- a/examples/sdl_opengl_example/imgui_impl_sdl.cpp +++ b/examples/sdl_opengl_example/imgui_impl_sdl.cpp @@ -198,7 +198,7 @@ io.SetClipboardTextFn = ImGui_ImplSdl_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplSdl_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 SDL_SysWMinfo wmInfo; SDL_VERSION(&wmInfo.version); SDL_GetWindowWMInfo(window, &wmInfo); diff --git a/imgui.cpp b/imgui.cpp index 6694451..779fb58 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -725,7 +725,7 @@ #define IM_INT_MAX (2147483647) // Play it nice with Windows users. Notepad in 2015 still doesn't display text data with Unix-style \n. -#ifdef _MSC_VER +#ifdef _WIN32 #define IM_NEWLINE "\r\n" #else #define IM_NEWLINE "\n" @@ -8706,13 +8706,17 @@ // PLATFORM DEPENDANT HELPERS //----------------------------------------------------------------------------- -#if defined(_MSC_VER) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS) +#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS) #ifndef _WINDOWS_ +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #endif +#ifdef _MSC_VER #pragma comment(lib, "user32") +#endif // Win32 API clipboard implementation static const char* GetClipboardTextFn_DefaultImpl() @@ -8782,14 +8786,18 @@ #endif -#if defined(_MSC_VER) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS) +#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS) #ifndef _WINDOWS_ +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #endif -#include +#include +#ifdef _MSC_VER #pragma comment(lib, "imm32") +#endif static void ImeSetInputScreenPosFn_DefaultImpl(int x, int y) { diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp index 8b04feb..1713bd5 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp @@ -7,7 +7,7 @@ // GL3W/GLFW #include #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -253,7 +253,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfwGL3_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfwGL3_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfwGL3_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/opengl_example/imgui_impl_glfw.cpp b/examples/opengl_example/imgui_impl_glfw.cpp index 8338091..331c777 100644 --- a/examples/opengl_example/imgui_impl_glfw.cpp +++ b/examples/opengl_example/imgui_impl_glfw.cpp @@ -6,7 +6,7 @@ // GLFW #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -198,7 +198,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfw_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/sdl_opengl_example/imgui_impl_sdl.cpp b/examples/sdl_opengl_example/imgui_impl_sdl.cpp index 980b11d..2392014 100644 --- a/examples/sdl_opengl_example/imgui_impl_sdl.cpp +++ b/examples/sdl_opengl_example/imgui_impl_sdl.cpp @@ -198,7 +198,7 @@ io.SetClipboardTextFn = ImGui_ImplSdl_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplSdl_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 SDL_SysWMinfo wmInfo; SDL_VERSION(&wmInfo.version); SDL_GetWindowWMInfo(window, &wmInfo); diff --git a/imgui.cpp b/imgui.cpp index 6694451..779fb58 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -725,7 +725,7 @@ #define IM_INT_MAX (2147483647) // Play it nice with Windows users. Notepad in 2015 still doesn't display text data with Unix-style \n. -#ifdef _MSC_VER +#ifdef _WIN32 #define IM_NEWLINE "\r\n" #else #define IM_NEWLINE "\n" @@ -8706,13 +8706,17 @@ // PLATFORM DEPENDANT HELPERS //----------------------------------------------------------------------------- -#if defined(_MSC_VER) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS) +#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS) #ifndef _WINDOWS_ +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #endif +#ifdef _MSC_VER #pragma comment(lib, "user32") +#endif // Win32 API clipboard implementation static const char* GetClipboardTextFn_DefaultImpl() @@ -8782,14 +8786,18 @@ #endif -#if defined(_MSC_VER) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS) +#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS) #ifndef _WINDOWS_ +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #endif -#include +#include +#ifdef _MSC_VER #pragma comment(lib, "imm32") +#endif static void ImeSetInputScreenPosFn_DefaultImpl(int x, int y) { diff --git a/imgui_demo.cpp b/imgui_demo.cpp index cf9444a..f4f5850 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -29,7 +29,7 @@ #endif // Play it nice with Windows users. Notepad in 2015 still doesn't display text data with Unix-style \n. -#ifdef _MSC_VER +#ifdef _WIN32 #define IM_NEWLINE "\r\n" #else #define IM_NEWLINE "\n" diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp index 8b04feb..1713bd5 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp @@ -7,7 +7,7 @@ // GL3W/GLFW #include #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -253,7 +253,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfwGL3_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfwGL3_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfwGL3_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/opengl_example/imgui_impl_glfw.cpp b/examples/opengl_example/imgui_impl_glfw.cpp index 8338091..331c777 100644 --- a/examples/opengl_example/imgui_impl_glfw.cpp +++ b/examples/opengl_example/imgui_impl_glfw.cpp @@ -6,7 +6,7 @@ // GLFW #include -#ifdef _MSC_VER +#ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL @@ -198,7 +198,7 @@ io.RenderDrawListsFn = ImGui_ImplGlfw_RenderDrawLists; io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 io.ImeWindowHandle = glfwGetWin32Window(g_Window); #endif diff --git a/examples/sdl_opengl_example/imgui_impl_sdl.cpp b/examples/sdl_opengl_example/imgui_impl_sdl.cpp index 980b11d..2392014 100644 --- a/examples/sdl_opengl_example/imgui_impl_sdl.cpp +++ b/examples/sdl_opengl_example/imgui_impl_sdl.cpp @@ -198,7 +198,7 @@ io.SetClipboardTextFn = ImGui_ImplSdl_SetClipboardText; io.GetClipboardTextFn = ImGui_ImplSdl_GetClipboardText; -#ifdef _MSC_VER +#ifdef _WIN32 SDL_SysWMinfo wmInfo; SDL_VERSION(&wmInfo.version); SDL_GetWindowWMInfo(window, &wmInfo); diff --git a/imgui.cpp b/imgui.cpp index 6694451..779fb58 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -725,7 +725,7 @@ #define IM_INT_MAX (2147483647) // Play it nice with Windows users. Notepad in 2015 still doesn't display text data with Unix-style \n. -#ifdef _MSC_VER +#ifdef _WIN32 #define IM_NEWLINE "\r\n" #else #define IM_NEWLINE "\n" @@ -8706,13 +8706,17 @@ // PLATFORM DEPENDANT HELPERS //----------------------------------------------------------------------------- -#if defined(_MSC_VER) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS) +#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS) #ifndef _WINDOWS_ +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #endif +#ifdef _MSC_VER #pragma comment(lib, "user32") +#endif // Win32 API clipboard implementation static const char* GetClipboardTextFn_DefaultImpl() @@ -8782,14 +8786,18 @@ #endif -#if defined(_MSC_VER) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS) +#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS) #ifndef _WINDOWS_ +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #endif -#include +#include +#ifdef _MSC_VER #pragma comment(lib, "imm32") +#endif static void ImeSetInputScreenPosFn_DefaultImpl(int x, int y) { diff --git a/imgui_demo.cpp b/imgui_demo.cpp index cf9444a..f4f5850 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -29,7 +29,7 @@ #endif // Play it nice with Windows users. Notepad in 2015 still doesn't display text data with Unix-style \n. -#ifdef _MSC_VER +#ifdef _WIN32 #define IM_NEWLINE "\r\n" #else #define IM_NEWLINE "\n" diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 52bd4f1..4cc60f9 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -19,7 +19,7 @@ #include // vsnprintf, sscanf, printf #include // new (ptr) #ifndef alloca -#if defined(_MSC_VER) || defined(__MINGW32__) +#if _WIN32 #include // alloca #else #include // alloca