KKBSwitch – keyboard layout indicator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

windowwatcher.h 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /***************************************************************************
  2. * Copyright (C) 2004 by Leonid Zeitlin *
  3. * lz@europe.com *
  4. * *
  5. * This program is free software; you can redistribute it and/or modify *
  6. * it under the terms of the GNU General Public License as published by *
  7. * the Free Software Foundation; either version 2 of the License, or *
  8. * (at your option) any later version. *
  9. * *
  10. * This program is distributed in the hope that it will be useful, *
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  13. * GNU General Public License for more details. *
  14. * *
  15. * You should have received a copy of the GNU General Public License *
  16. * along with this program; if not, write to the *
  17. * Free Software Foundation, Inc., *
  18. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
  19. ***************************************************************************/
  20. /* Created 04.05.2004 */
  21. #ifndef WINDOWWATCHER_H
  22. #define WINDOWWATCHER_H
  23. #include <ntqobject.h>
  24. class KBConfig;
  25. class KWinModule;
  26. /**
  27. @author Leonid Zeitlin
  28. This class watches for active window changes and notifies KKBSwitch
  29. that the keyboard group needs to be canged
  30. */
  31. class WindowWatcher : public TQObject {
  32. Q_OBJECT
  33. protected:
  34. KBConfig *m_kbconf;
  35. KWinModule *m_twin_module;
  36. protected slots:
  37. virtual void windowAdded(WId id) = 0;
  38. virtual void windowRemoved(WId id) = 0;
  39. virtual void activeWindowChanged(WId id) = 0;
  40. public:
  41. WindowWatcher(KBConfig *kbconf, TQObject *parent = 0, const char *name = 0);
  42. ~WindowWatcher();
  43. virtual void changeGroup(int groupno, int next_groupno) = 0;
  44. virtual void reset() = 0;
  45. signals:
  46. void windowChanged(int groupno, int next_groupno);
  47. };
  48. #endif