void ShortcutsPlugin::applyKeys() { applyKeys(MenuMain); applyKeys(MenuGroup); applyKeys(MenuContact); applyKeys(MenuStatus); }
ShortcutsPlugin::ShortcutsPlugin(unsigned base, Buffer *config) : Plugin(base) { load_data(shortcutsData, &data, config); #ifdef WIN32 m_bInit = false; init(); #else applyKeys(); #endif }
ShortcutsPlugin::ShortcutsPlugin(unsigned base, Buffer *config) : Plugin(base) { load_data(shortcutsData, &data, config); #ifdef WIN32 m_bInit = false; init(); #else applyKeys(); #ifndef USE_KDE oldFilter = qt_set_x11_event_filter(X11EventFilter); #endif #endif }
void ShortcutsPlugin::init() { if (m_bInit) return; QWidget *main = getMainWindow(); if (main){ if (IsWindowUnicode(main->winId())){ oldProc = (WNDPROC)SetWindowLongW(main->winId(), GWL_WNDPROC, (LONG)keysWndProc); }else{ oldProc = (WNDPROC)SetWindowLongA(main->winId(), GWL_WNDPROC, (LONG)keysWndProc); } m_bInit = true; applyKeys(); } }
void keyMouse::update(){ if(firstRun){ buildLookupTable(); firstRun = false; } //Retrieve the button and motion data from the uC map.getData(&buttons, &moData); //Press or release any buttons given by the buttons vector //This includes any "virtual" buttons from analog values applyKeys(); int x; int y; //Process the motion input for moving the mouse motion.processInput(&moData, &x, &y); //Apply the mouse movement if enabled if(!moData.motionDisable){ moveMouse(x,y); } }