| 123 | } |
| 124 | |
| 125 | void CMouseControl::GetScreenSize() |
| 126 | { |
| 127 | #if defined(WIN32) |
| 128 | DEVMODE devMode; |
| 129 | // Get screen size. TODO: test with multiple displays |
| 130 | BOOL retval= EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devMode); |
| 131 | if (!retval) { exit (-1); } |
| 132 | |
| 133 | m_ScreenHeight= devMode.dmPelsHeight; |
| 134 | m_ScreenWidth= devMode.dmPelsWidth; |
| 135 | #else // Linux |
| 136 | m_ScreenHeight= |
| 137 | DisplayHeight (static_cast<Display*>(m_pDisplay), DefaultScreen (static_cast<Display*>(m_pDisplay))); |
| 138 | m_ScreenWidth= |
| 139 | DisplayWidth (static_cast<Display*>(m_pDisplay), DefaultScreen (static_cast<Display*>(m_pDisplay))); |
| 140 | #endif |
| 141 | slog_write (SLOG_PRIO_DEBUG, "current screen size: %d, %d\n", m_ScreenWidth, m_ScreenHeight); |
| 142 | } |
| 143 | |
| 144 | void CMouseControl::GetPointerLocation (int& x, int& y) |
| 145 | { |
nothing calls this directly
no outgoing calls
no test coverage detected