]> Dogcows Code - chaz/openbox/blobdiff - src/python.hh
include widgetbase not widget
[chaz/openbox] / src / python.hh
index 7cec766712a9ac1376f9dff7b38400b3d0e65eb3..7c31e85c4a48ed9515dba3763be821e4ea6f85fb 100644 (file)
@@ -53,6 +53,12 @@ enum KeyContext {
   NUM_KEY_CONTEXT
 };
 
+enum KeyAction {
+  EventKeyPress,
+  EventKeyRelease,
+  NUM_KEY_ACTION
+};
+
 enum EventAction {
   EventEnterWindow,
   EventLeaveWindow,
@@ -61,9 +67,9 @@ enum EventAction {
   EventCloseWindow,
   EventStartup,
   EventShutdown,
-  EventKey,
   EventFocus,
   EventBell,
+  EventUrgentWindow,
   NUM_EVENTS
 };
 
@@ -147,18 +153,18 @@ public:
   Client *client;
   Time time;
   unsigned int state;
-  std::string key;
-  EventAction action; // this is here so that all the Data structs have .action
+  char *key;
+  KeyAction action;
 
   KeyData(int screen, Client *client, Time time, unsigned int state,
-          unsigned int key) {
+          unsigned int key, KeyAction action) {
     this->screen = screen;
     this->client = client;
     this->time   = time;
     this->state  = state;
     this->key    = XKeysymToString(XKeycodeToKeysym(**otk::display,
                                                     key, 0));
-    this->action = EventKey;
+    this->action = action;
   }
 };
 
@@ -186,6 +192,9 @@ PyObject *mbind(const std::string &button, ob::MouseContext context,
 
 PyObject *kbind(PyObject *keylist, ob::KeyContext context, PyObject *func);
 
+PyObject *kgrab(int screen, PyObject *func);
+PyObject *kungrab();
+
 PyObject *ebind(ob::EventAction action, PyObject *func);
 
 void set_reset_key(const std::string &key);
This page took 0.025904 seconds and 4 git commands to generate.