diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-24 07:37:26 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-24 07:37:26 +0000 |
| commit | 91c7e5c378b1a639c6f5383915ed68b36b7735d4 (patch) | |
| tree | 896039b1f31ca8a3a41f9ac81e35467247f6001d /src/python.hh | |
| parent | 73a776ee90879ea2b42c6e959f781a6600fada80 (diff) | |
allow python to grab the keyboard. have release events go to the grabs callback. remove the modifier from teh state when a modifier key is the one being released
Diffstat (limited to 'src/python.hh')
| -rw-r--r-- | src/python.hh | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/python.hh b/src/python.hh index d8b943e7..91d89b8a 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(PyObject *func); +PyObject *kungrab(); + PyObject *ebind(ob::EventAction action, PyObject *func); void set_reset_key(const std::string &key); |
