numlock.h 800 B

12345678910111213141516171819202122232425262728293031
  1. /* SLiM - Simple Login Manager
  2. Copyright (C) 2004-06 Simone Rota <sip@varlock.com>
  3. Copyright (C) 2004-06 Johannes Winkelmann <jw@tks6.net>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. */
  9. #ifndef _NUMLOCK_H_
  10. #define _NUMLOCK_H_
  11. #include <X11/Xlib.h>
  12. #include <X11/XKBlib.h>
  13. #include <X11/keysym.h>
  14. class NumLock {
  15. public:
  16. NumLock();
  17. static void setOn();
  18. static void setOff();
  19. private:
  20. static int xkb_init(Display* dpy);
  21. static unsigned int xkb_mask_modifier( XkbDescPtr xkb, const char *name );
  22. static unsigned int xkb_numlock_mask(Display* dpy);
  23. };
  24. #endif