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.
 
 
 
 
 

34 lines
927 B

  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. Copyright (C) 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  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. #ifndef _NUMLOCK_H_
  11. #define _NUMLOCK_H_
  12. #include <X11/Xlib.h>
  13. #include <X11/XKBlib.h>
  14. #include <X11/keysym.h>
  15. class NumLock {
  16. public:
  17. NumLock();
  18. static void setOn(Display *dpy);
  19. static void setOff(Display *dpy);
  20. private:
  21. static int xkb_init(Display *dpy);
  22. static unsigned int xkb_mask_modifier(XkbDescPtr xkb, const char *name);
  23. static unsigned int xkb_numlock_mask(Display *dpy);
  24. static void control_numlock(Display *dpy, bool flag);
  25. };
  26. #endif /* _NUMLOCK_H_ */