desktop.cpp 352 B

123456789101112131415161718
  1. #if defined(Hiro_Desktop)
  2. namespace hiro {
  3. auto pDesktop::size() -> Size {
  4. return {GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN)};
  5. }
  6. auto pDesktop::workspace() -> Geometry {
  7. RECT rc;
  8. SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, 0);
  9. return {rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top};
  10. }
  11. }
  12. #endif