SDL_windowsmodes.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. #include "SDL_internal.h"
  19. #ifndef SDL_windowsmodes_h_
  20. #define SDL_windowsmodes_h_
  21. typedef struct
  22. {
  23. WCHAR DeviceName[32];
  24. HMONITOR MonitorHandle;
  25. SDL_bool IsValid;
  26. SDL_Rect bounds;
  27. } SDL_DisplayData;
  28. typedef struct
  29. {
  30. DEVMODE DeviceMode;
  31. } SDL_DisplayModeData;
  32. extern int WIN_InitModes(_THIS);
  33. extern int WIN_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect);
  34. extern int WIN_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect);
  35. extern void WIN_ScreenPointFromSDL(int *x, int *y, int *dpiOut);
  36. extern void WIN_ScreenPointFromSDLFloat(float x, float y, LONG *xOut, LONG *yOut, int *dpiOut);
  37. extern void WIN_ScreenPointToSDL(int *x, int *y);
  38. extern void WIN_ScreenPointToSDLFloat(LONG x, LONG y, float *xOut, float *yOut);
  39. extern int WIN_GetDisplayDPI(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi);
  40. extern void WIN_GetDisplayModes(_THIS, SDL_VideoDisplay *display);
  41. extern int WIN_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode);
  42. extern void WIN_RefreshDisplays(_THIS);
  43. extern void WIN_QuitModes(_THIS);
  44. #endif /* SDL_windowsmodes_h_ */