imgui_impl_win32.h 1.7 KB

123456789101112131415161718192021222324252627
  1. // dear imgui: Platform Binding for Windows (standard windows API for 32 and 64 bits applications)
  2. // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
  3. // Implemented features:
  4. // [X] Platform: Clipboard support (for Win32 this is actually part of core imgui)
  5. // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
  6. // [X] Platform: Keyboard arrays indexed using VK_* Virtual Key Codes, e.g. ImGui::IsKeyPressed(VK_SPACE).
  7. // [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
  8. // [X] Platform: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
  9. #pragma once
  10. IMGUI_IMPL_API bool ImGui_ImplWin32_Init(void* hwnd);
  11. IMGUI_IMPL_API void ImGui_ImplWin32_Shutdown();
  12. IMGUI_IMPL_API void ImGui_ImplWin32_NewFrame();
  13. // DPI-related helpers (which run and compile without requiring 8.1 or 10, neither Windows version, neither associated SDK)
  14. IMGUI_IMPL_API void ImGui_ImplWin32_EnableDpiAwareness();
  15. IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForHwnd(void* hwnd); // HWND hwnd
  16. IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForMonitor(void* monitor); // HMONITOR monitor
  17. // Handler for Win32 messages, update mouse/keyboard data.
  18. // You may or not need this for your implementation, but it can serve as reference for handling inputs.
  19. // Intentionally commented out to avoid dragging dependencies on <windows.h> types. You can COPY this line into your .cpp code instead.
  20. /*
  21. IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
  22. */