shellscalingapi.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _SHELLSCALINGAPI_H_
  7. #define _SHELLSCALINGAPI_H_
  8. #include <shtypes.h>
  9. #include <winapifamily.h>
  10. #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  11. #ifndef SCALING_ENUMS_DECLARED
  12. typedef enum {
  13. SCF_VALUE_NONE = 0x00,
  14. SCF_SCALE = 0x01,
  15. SCF_PHYSICAL = 0x02
  16. } SCALE_CHANGE_FLAGS;
  17. DEFINE_ENUM_FLAG_OPERATORS(SCALE_CHANGE_FLAGS);
  18. typedef enum {
  19. DEVICE_PRIMARY = 0,
  20. DEVICE_IMMERSIVE = 1
  21. } DISPLAY_DEVICE_TYPE;
  22. #define SCALING_ENUMS_DECLARED
  23. #endif /* SCALING_ENUMS_DECLARED */
  24. #if NTDDI_VERSION >= NTDDI_WIN8
  25. STDAPI_(DEVICE_SCALE_FACTOR) GetScaleFactorForDevice(DISPLAY_DEVICE_TYPE deviceType);
  26. STDAPI RegisterScaleChangeNotifications(DISPLAY_DEVICE_TYPE displayDevice, HWND hwndNotify, UINT uMsgNotify,
  27. DWORD *pdwCookie);
  28. STDAPI RevokeScaleChangeNotifications(DISPLAY_DEVICE_TYPE displayDevice, DWORD dwCookie);
  29. #endif /* NTDDI_VERSION >= NTDDI_WIN8 */
  30. #ifndef DPI_ENUMS_DECLARED
  31. typedef enum MONITOR_DPI_TYPE {
  32. MDT_EFFECTIVE_DPI = 0,
  33. MDT_ANGULAR_DPI = 1,
  34. MDT_RAW_DPI = 2,
  35. MDT_DEFAULT = MDT_EFFECTIVE_DPI
  36. } MONITOR_DPI_TYPE;
  37. typedef enum PROCESS_DPI_AWARENESS {
  38. PROCESS_DPI_UNAWARE = 0,
  39. PROCESS_SYSTEM_DPI_AWARE = 1,
  40. PROCESS_PER_MONITOR_DPI_AWARE = 2
  41. } PROCESS_DPI_AWARENESS;
  42. #define DPI_ENUMS_DECLARED
  43. #endif /* DPI_ENUMS_DECLARED */
  44. #if NTDDI_VERSION >= NTDDI_WINBLUE
  45. STDAPI GetScaleFactorForMonitor(HMONITOR hMon, DEVICE_SCALE_FACTOR *pScale);
  46. STDAPI RegisterScaleChangeEvent(HANDLE hEvent, DWORD_PTR *pdwCookie);
  47. STDAPI UnregisterScaleChangeEvent(DWORD_PTR dwCookie);
  48. STDAPI GetDpiForMonitor(HMONITOR hmonitor, MONITOR_DPI_TYPE dpiType, UINT *dpiX, UINT *dpiY);
  49. STDAPI GetProcessDpiAwareness(HANDLE hprocess, PROCESS_DPI_AWARENESS *value);
  50. STDAPI SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value);
  51. #endif /* NTDDI_VERSION >= NTDDI_WINBLUE */
  52. #if NTDDI_VERSION >= NTDDI_WINTHRESHOLD
  53. #ifndef SHELL_UI_COMPONENT_ENUMS_DECLARED
  54. typedef enum {
  55. SHELL_UI_COMPONENT_TASKBARS = 0,
  56. SHELL_UI_COMPONENT_NOTIFICATIONAREA = 1,
  57. SHELL_UI_COMPONENT_DESKBAND = 2
  58. } SHELL_UI_COMPONENT;
  59. #define SHELL_UI_COMPONENT_ENUMS_DECLARED
  60. #endif /* SHELL_UI_COMPONENT_ENUMS_DECLARED */
  61. UINT WINAPI GetDpiForShellUIComponent(SHELL_UI_COMPONENT component);
  62. #endif /* NTDDI_VERSION >= NTDDI_WINTHRESHOLD */
  63. #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
  64. #endif /* _SHELLSCALINGAPI_H_ */