00001 // Copyright (c) 2003 - 2004 Anselm R. Garbe <anselmg at t-online.de> 00002 // See ../LICENSE.txt for license details. 00003 // 00004 // $Id: shortcut.h 7 2007-05-24 11:03:53Z eg1981 $ 00005 00006 #ifndef __SHORTCUT_H 00007 #define __SHORTCUT_H 00008 00009 extern "C" { 00010 #include <X11/Xlib.h> 00011 } 00012 00013 #include <string> 00014 #include "ncwm.h" 00015 00020 class Shortcut { 00021 00022 public: 00023 00024 Shortcut(unsigned long modMask, KeyCode keyCode, Shortcut *next, 00025 unsigned int button = 0); 00026 ~Shortcut(); 00027 00028 KeyCode keyCode(); 00029 void setKeyCode(KeyCode keyCode); 00030 00031 unsigned long modMask() const; 00032 void setModMask(unsigned long modMask); 00033 00034 unsigned int button() const; 00035 00036 Shortcut *next() const; 00037 00038 void setNext(Shortcut *next); 00039 00040 static Shortcut *shortcut(string keys); 00041 00042 private: 00043 00044 Shortcut *next_; 00045 KeyCode keyCode_; 00046 unsigned long modMask_; 00047 unsigned int button_; 00048 }; 00049 00050 #endif // __SHORTCUT_H