X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fpython.hh;h=7c31e85c4a48ed9515dba3763be821e4ea6f85fb;hb=3682df8ed27e96067a171b71cbf58d5a00ca813b;hp=d8b943e746d2ea69a4629ab80c650e3a907a2aa6;hpb=ab2968b3a5d61e2dc6b0a64153a7abb0078ee442;p=chaz%2Fopenbox diff --git a/src/python.hh b/src/python.hh index d8b943e7..7c31e85c 100644 --- a/src/python.hh +++ b/src/python.hh @@ -53,6 +53,12 @@ enum KeyContext { NUM_KEY_CONTEXT }; +enum KeyAction { + EventKeyPress, + EventKeyRelease, + NUM_KEY_ACTION +}; + enum EventAction { EventEnterWindow, EventLeaveWindow, @@ -61,10 +67,9 @@ enum EventAction { EventCloseWindow, EventStartup, EventShutdown, - EventKey, EventFocus, EventBell, - EventUrgentNotify, + EventUrgentWindow, NUM_EVENTS }; @@ -148,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; } }; @@ -187,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);