Macros | Typedefs | Enumerations | Functions | Variables
imgui_impl_win32.cpp File Reference
#include "imgui.h"
#include "imgui_impl_win32.h"
#include <windows.h>
#include <tchar.h>
#include <XInput.h>
Include dependency graph for imgui_impl_win32.cpp:

Go to the source code of this file.

Macros

#define DBT_DEVNODES_CHANGED   0x0007
 
#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE   (DPI_AWARENESS_CONTEXT)-3
 
#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2   (DPI_AWARENESS_CONTEXT)-4
 
#define IsWindows8Point1OrGreater()   IsWindowsVersionOrGreater(HIBYTE(0x0602), LOBYTE(0x0602), 0)
 
#define MAP_ANALOG(NAV_NO, VALUE, V0, V1)   { float vn = (float)(VALUE - V0) / (float)(V1 - V0); if (vn > 1.0f) vn = 1.0f; if (vn > 0.0f && io.NavInputs[NAV_NO] < vn) io.NavInputs[NAV_NO] = vn; }
 
#define MAP_BUTTON(NAV_NO, BUTTON_ENUM)   { io.NavInputs[NAV_NO] = (gamepad.wButtons & BUTTON_ENUM) ? 1.0f : 0.0f; }
 
#define WIN32_LEAN_AND_MEAN
 
#define WM_MOUSEHWHEEL   0x020E
 

Typedefs

typedef HRESULT(WINAPI * PFN_GetDpiForMonitor) (HMONITOR, MONITOR_DPI_TYPE, UINT *, UINT *)
 
typedef HRESULT(WINAPI * PFN_SetProcessDpiAwareness) (PROCESS_DPI_AWARENESS)
 
typedef DPI_AWARENESS_CONTEXT(WINAPI * PFN_SetThreadDpiAwarenessContext) (DPI_AWARENESS_CONTEXT)
 

Enumerations

enum  MONITOR_DPI_TYPE { MDT_EFFECTIVE_DPI = 0, MDT_ANGULAR_DPI = 1, MDT_RAW_DPI = 2, MDT_DEFAULT = MDT_EFFECTIVE_DPI }
 
enum  PROCESS_DPI_AWARENESS { PROCESS_DPI_UNAWARE = 0, PROCESS_SYSTEM_DPI_AWARE = 1, PROCESS_PER_MONITOR_DPI_AWARE = 2 }
 

Functions

 DECLARE_HANDLE (DPI_AWARENESS_CONTEXT)
 
void ImGui_ImplWin32_EnableDpiAwareness ()
 
float ImGui_ImplWin32_GetDpiScaleForHwnd (void *hwnd)
 
float ImGui_ImplWin32_GetDpiScaleForMonitor (void *monitor)
 
bool ImGui_ImplWin32_Init (void *hwnd)
 
void ImGui_ImplWin32_NewFrame ()
 
void ImGui_ImplWin32_Shutdown ()
 
static void ImGui_ImplWin32_UpdateGamepads ()
 
static bool ImGui_ImplWin32_UpdateMouseCursor ()
 
static void ImGui_ImplWin32_UpdateMousePos ()
 
IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static BOOL IsWindowsVersionOrGreater (WORD major, WORD minor, WORD sp)
 

Variables

static bool g_HasGamepad = false
 
static HWND g_hWnd = NULL
 
static ImGuiMouseCursor g_LastMouseCursor = ImGuiMouseCursor_COUNT
 
static INT64 g_TicksPerSecond = 0
 
static INT64 g_Time = 0
 
static bool g_WantUpdateHasGamepad = true
 

Macro Definition Documentation

◆ DBT_DEVNODES_CHANGED

#define DBT_DEVNODES_CHANGED   0x0007

Definition at line 257 of file imgui_impl_win32.cpp.

◆ DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE

#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE   (DPI_AWARENESS_CONTEXT)-3

Definition at line 378 of file imgui_impl_win32.cpp.

◆ DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2

#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2   (DPI_AWARENESS_CONTEXT)-4

Definition at line 381 of file imgui_impl_win32.cpp.

◆ IsWindows8Point1OrGreater

#define IsWindows8Point1OrGreater ( )    IsWindowsVersionOrGreater(HIBYTE(0x0602), LOBYTE(0x0602), 0)

Definition at line 369 of file imgui_impl_win32.cpp.

◆ MAP_ANALOG

#define MAP_ANALOG (   NAV_NO,
  VALUE,
  V0,
  V1 
)    { float vn = (float)(VALUE - V0) / (float)(V1 - V0); if (vn > 1.0f) vn = 1.0f; if (vn > 0.0f && io.NavInputs[NAV_NO] < vn) io.NavInputs[NAV_NO] = vn; }

◆ MAP_BUTTON

#define MAP_BUTTON (   NAV_NO,
  BUTTON_ENUM 
)    { io.NavInputs[NAV_NO] = (gamepad.wButtons & BUTTON_ENUM) ? 1.0f : 0.0f; }

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 13 of file imgui_impl_win32.cpp.

◆ WM_MOUSEHWHEEL

#define WM_MOUSEHWHEEL   0x020E

Definition at line 254 of file imgui_impl_win32.cpp.

Typedef Documentation

◆ PFN_GetDpiForMonitor

typedef HRESULT(WINAPI* PFN_GetDpiForMonitor) (HMONITOR, MONITOR_DPI_TYPE, UINT *, UINT *)

Definition at line 384 of file imgui_impl_win32.cpp.

◆ PFN_SetProcessDpiAwareness

typedef HRESULT(WINAPI* PFN_SetProcessDpiAwareness) (PROCESS_DPI_AWARENESS)

Definition at line 383 of file imgui_impl_win32.cpp.

◆ PFN_SetThreadDpiAwarenessContext

typedef DPI_AWARENESS_CONTEXT(WINAPI* PFN_SetThreadDpiAwarenessContext) (DPI_AWARENESS_CONTEXT)

Definition at line 385 of file imgui_impl_win32.cpp.

Enumeration Type Documentation

◆ MONITOR_DPI_TYPE

Enumerator
MDT_EFFECTIVE_DPI 
MDT_ANGULAR_DPI 
MDT_RAW_DPI 
MDT_DEFAULT 

Definition at line 374 of file imgui_impl_win32.cpp.

◆ PROCESS_DPI_AWARENESS

Enumerator
PROCESS_DPI_UNAWARE 
PROCESS_SYSTEM_DPI_AWARE 
PROCESS_PER_MONITOR_DPI_AWARE 

Definition at line 373 of file imgui_impl_win32.cpp.

Function Documentation

◆ DECLARE_HANDLE()

DECLARE_HANDLE ( DPI_AWARENESS_CONTEXT  )

◆ ImGui_ImplWin32_EnableDpiAwareness()

void ImGui_ImplWin32_EnableDpiAwareness ( )

Definition at line 388 of file imgui_impl_win32.cpp.

◆ ImGui_ImplWin32_GetDpiScaleForHwnd()

float ImGui_ImplWin32_GetDpiScaleForHwnd ( void hwnd)

Definition at line 435 of file imgui_impl_win32.cpp.

◆ ImGui_ImplWin32_GetDpiScaleForMonitor()

float ImGui_ImplWin32_GetDpiScaleForMonitor ( void monitor)

Definition at line 415 of file imgui_impl_win32.cpp.

◆ ImGui_ImplWin32_Init()

bool ImGui_ImplWin32_Init ( void hwnd)

Definition at line 64 of file imgui_impl_win32.cpp.

◆ ImGui_ImplWin32_NewFrame()

void ImGui_ImplWin32_NewFrame ( )

Definition at line 214 of file imgui_impl_win32.cpp.

◆ ImGui_ImplWin32_Shutdown()

void ImGui_ImplWin32_Shutdown ( )

Definition at line 106 of file imgui_impl_win32.cpp.

◆ ImGui_ImplWin32_UpdateGamepads()

static void ImGui_ImplWin32_UpdateGamepads ( )
static

Definition at line 166 of file imgui_impl_win32.cpp.

◆ ImGui_ImplWin32_UpdateMouseCursor()

static bool ImGui_ImplWin32_UpdateMouseCursor ( )
static

Definition at line 111 of file imgui_impl_win32.cpp.

◆ ImGui_ImplWin32_UpdateMousePos()

static void ImGui_ImplWin32_UpdateMousePos ( )
static

Definition at line 144 of file imgui_impl_win32.cpp.

◆ ImGui_ImplWin32_WndProcHandler()

IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 272 of file imgui_impl_win32.cpp.

◆ IsWindowsVersionOrGreater()

static BOOL IsWindowsVersionOrGreater ( WORD  major,
WORD  minor,
WORD  sp 
)
static

Definition at line 360 of file imgui_impl_win32.cpp.

Variable Documentation

◆ g_HasGamepad

bool g_HasGamepad = false
static

Definition at line 60 of file imgui_impl_win32.cpp.

◆ g_hWnd

HWND g_hWnd = NULL
static

Definition at line 56 of file imgui_impl_win32.cpp.

◆ g_LastMouseCursor

ImGuiMouseCursor g_LastMouseCursor = ImGuiMouseCursor_COUNT
static

Definition at line 59 of file imgui_impl_win32.cpp.

◆ g_TicksPerSecond

INT64 g_TicksPerSecond = 0
static

Definition at line 58 of file imgui_impl_win32.cpp.

◆ g_Time

INT64 g_Time = 0
static

Definition at line 57 of file imgui_impl_win32.cpp.

◆ g_WantUpdateHasGamepad

bool g_WantUpdateHasGamepad = true
static

Definition at line 61 of file imgui_impl_win32.cpp.



libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:03