]> Dogcows Code - chaz/openbox/blobdiff - src/bindings.hh
load config options from the python environment
[chaz/openbox] / src / bindings.hh
index 4545627a713c808d37cd77f5cf78284332d073c8..0ae035761437ba5890860684d351e80ce4d6aedc 100644 (file)
@@ -6,11 +6,16 @@
   @brief I dunno.. some binding stuff?
 */
 
+#include "actions.hh"
+#include "otk/timer.hh"
+
 #include <string>
 #include <vector>
 
 namespace ob {
 
+class OBClient;
+
 typedef struct Binding {
   unsigned int modifiers;
   unsigned int key;
@@ -24,7 +29,6 @@ typedef struct Binding {
 
 typedef struct BindingTree {
   Binding binding;
-  std::string text;
   int id;     // the id given for the binding in add()
   bool chain; // true if this is a chain to another key (not an action)
 
@@ -46,19 +50,27 @@ public:
   typedef std::vector<std::string> StringVect;
 
 private:
-  BindingTree _tree;// root node of the tree (this doesn't have siblings!)
+  BindingTree _tree; // root node of the tree (this doesn't have siblings!)
+  BindingTree *_curpos; // position in the keytree
+
+  Binding _resetkey; // the key which resets the key chain status
+
+  otk::OBTimer _timer;
+  
+  int find(BindingTree *search) const;
+  bool translate(const std::string &str, Binding &b) const;
+  BindingTree *buildtree(const StringVect &keylist, int id) const;
+  void assimilate(BindingTree *node);
+
+  static void reset(OBBindings *self);
 
-  int find(BindingTree *search);
-  bool translate(const std::string &str, Binding &b);
-  BindingTree *buildtree(const StringVect &keylist, int id);
 public:
   //! Initializes an OBBinding object
   OBBindings();
   //! Destroys the OBBinding object
   virtual ~OBBindings();
 
-  //! Adds a new binding
+  //! Adds a new key binding
   /*!
     A binding will fail to be added if the binding already exists (as part of
     a chain or not), or if any of the strings in the keylist are invalid.    
@@ -83,11 +95,11 @@ public:
   */
   int find(const StringVect &keylist);
 
-  // XXX: need an exec() function or something that will be used by openbox
-  //      and hold state for which chain we're in etc. (it could have a timer
-  //      for reseting too...)
+  void fire(Window window, unsigned int modifiers,unsigned int key, Time time);
+
+  void setResetKey(const std::string &key);
 
-  void display();
+  void grabKeys(bool grab);
 };
 
 }
This page took 0.024157 seconds and 4 git commands to generate.