KUtils
Go to the documentation of this file.
21 #define _WIN32_WINNT 0x0501
35 int WindowsPoller::getIdleTime()
41 memset(&lii, 0,
sizeof(lii));
43 lii.cbSize =
sizeof(lii);
45 BOOL ok = GetLastInputInfo(&lii);
47 idle = GetTickCount() - lii.dwTime;
56 bool WindowsPoller::additionalSetUp()
58 m_idleTimer =
new QTimer(
this);
59 connect(m_idleTimer, SIGNAL(
timeout()),
this, SLOT(checkForIdle()));
65 int width = GetSystemMetrics(SM_CXSCREEN);
66 int height = GetSystemMetrics(SM_CYSCREEN);
68 int x = (int)100 * 65536 / width;
69 int y = (int)100 * 65536 / height;
71 mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, x, y, NULL, NULL);
76 m_idleTimer->start(800);
84 void WindowsPoller::checkForIdle()
86 if (getIdleTime() < 1000) {
92 #include "windowspoller.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 22:01:51 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.