|
@@ -16,27 +16,9 @@
|
|
|
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
|
|
|
// - Introduction, links and more at the top of imgui.cpp
|
|
|
|
|
|
-#include "imgui.h"
|
|
|
-#ifndef IMGUI_DISABLE
|
|
|
-#include "imgui_impl_win32.h"
|
|
|
-#ifndef WIN32_LEAN_AND_MEAN
|
|
|
-#define WIN32_LEAN_AND_MEAN
|
|
|
-#endif
|
|
|
-#include <windows.h>
|
|
|
-#include <windowsx.h> // GET_X_LPARAM(), GET_Y_LPARAM()
|
|
|
-#include <tchar.h>
|
|
|
-#include <dwmapi.h>
|
|
|
-
|
|
|
-// Configuration flags to add in your imconfig.h file:
|
|
|
+// Configuration flags to add in your imconfig file:
|
|
|
//#define IMGUI_IMPL_WIN32_DISABLE_GAMEPAD // Disable gamepad support. This was meaningful before <1.81 but we now load XInput dynamically so the option is now less relevant.
|
|
|
|
|
|
-// Using XInput for gamepad (will load DLL dynamically)
|
|
|
-#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
|
|
|
-#include <xinput.h>
|
|
|
-typedef DWORD (WINAPI *PFN_XInputGetCapabilities)(DWORD, DWORD, XINPUT_CAPABILITIES*);
|
|
|
-typedef DWORD (WINAPI *PFN_XInputGetState)(DWORD, XINPUT_STATE*);
|
|
|
-#endif
|
|
|
-
|
|
|
// CHANGELOG
|
|
|
// (minor and older changes stripped away, please see git history for details)
|
|
|
// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys, app back/forward keys.
|
|
@@ -91,6 +73,34 @@ typedef DWORD (WINAPI *PFN_XInputGetState)(DWORD, XINPUT_STATE*);
|
|
|
// 2017-10-23: Inputs: Using Win32 ::SetCapture/::GetCapture() to retrieve mouse positions outside the client area when dragging.
|
|
|
// 2016-11-12: Inputs: Only call Win32 ::SetCursor(nullptr) when io.MouseDrawCursor is set.
|
|
|
|
|
|
+#include "imgui.h"
|
|
|
+#ifndef IMGUI_DISABLE
|
|
|
+#include "imgui_impl_win32.h"
|
|
|
+#ifndef WIN32_LEAN_AND_MEAN
|
|
|
+#define WIN32_LEAN_AND_MEAN
|
|
|
+#endif
|
|
|
+#include <windows.h>
|
|
|
+#include <windowsx.h> // GET_X_LPARAM(), GET_Y_LPARAM()
|
|
|
+#include <tchar.h>
|
|
|
+#include <dwmapi.h>
|
|
|
+
|
|
|
+// Using XInput for gamepad (will load DLL dynamically)
|
|
|
+#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
|
|
|
+#include <xinput.h>
|
|
|
+typedef DWORD(WINAPI* PFN_XInputGetCapabilities)(DWORD, DWORD, XINPUT_CAPABILITIES*);
|
|
|
+typedef DWORD(WINAPI* PFN_XInputGetState)(DWORD, XINPUT_STATE*);
|
|
|
+#endif
|
|
|
+
|
|
|
+// Clang/GCC warnings with -Weverything
|
|
|
+#if defined(__clang__)
|
|
|
+#pragma clang diagnostic push
|
|
|
+#pragma clang diagnostic ignored "-Wcast-function-type" // warning: cast between incompatible function types (for loader)
|
|
|
+#endif
|
|
|
+#if defined(__GNUC__)
|
|
|
+#pragma GCC diagnostic push
|
|
|
+#pragma GCC diagnostic ignored "-Wcast-function-type" // warning: cast between incompatible function types (for loader)
|
|
|
+#endif
|
|
|
+
|
|
|
struct ImGui_ImplWin32_Data
|
|
|
{
|
|
|
HWND hWnd;
|
|
@@ -900,4 +910,11 @@ void ImGui_ImplWin32_EnableAlphaCompositing(void* hwnd)
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
+#if defined(__GNUC__)
|
|
|
+#pragma GCC diagnostic pop
|
|
|
+#endif
|
|
|
+#if defined(__clang__)
|
|
|
+#pragma clang diagnostic pop
|
|
|
+#endif
|
|
|
+
|
|
|
#endif // #ifndef IMGUI_DISABLE
|