X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fpython.hh;h=7cec766712a9ac1376f9dff7b38400b3d0e65eb3;hb=39f19f427b68058b00e17ac972c5d9dfbda8c2e0;hp=8b41f00bfbd2a359628ff1be86fb05821d14e1eb;hpb=77ab46d1e35d48e73c201e6de88b26f48bb06425;p=chaz%2Fopenbox diff --git a/src/python.hh b/src/python.hh index 8b41f00b..7cec7667 100644 --- a/src/python.hh +++ b/src/python.hh @@ -10,6 +10,7 @@ #include "otk/rect.hh" #include "otk/property.hh" #include "otk/display.hh" +#include "otk/ustring.hh" extern "C" { #include @@ -31,7 +32,7 @@ enum MouseContext { MC_MaximizeButton, MC_CloseButton, MC_IconifyButton, - MC_StickyButton, + MC_AllDesktopsButton, MC_Grip, MC_Root, MC_MenuItem, @@ -60,6 +61,7 @@ enum EventAction { EventCloseWindow, EventStartup, EventShutdown, + EventKey, EventFocus, EventBell, NUM_EVENTS @@ -146,6 +148,7 @@ public: Time time; unsigned int state; std::string key; + EventAction action; // this is here so that all the Data structs have .action KeyData(int screen, Client *client, Time time, unsigned int state, unsigned int key) { @@ -153,8 +156,9 @@ public: this->client = client; this->time = time; this->state = state; - this->key = XKeysymToString(XKeycodeToKeysym(otk::Display::display, + this->key = XKeysymToString(XKeycodeToKeysym(**otk::display, key, 0)); + this->action = EventKey; } }; @@ -165,8 +169,8 @@ void python_destroy(); bool python_exec(const std::string &path); bool python_get_long(const char *name, long *value); -bool python_get_string(const char *name, std::string *value); -bool python_get_stringlist(const char *name, std::vector *value); +bool python_get_string(const char *name, otk::ustring *value); +bool python_get_stringlist(const char *name, std::vector *value); /*********************************************** * These are found in openbox.i, not python.cc * @@ -186,7 +190,7 @@ PyObject *ebind(ob::EventAction action, PyObject *func); void set_reset_key(const std::string &key); -PyObject *send_client_msg(Window target, int type, Window about, +PyObject *send_client_msg(Window target, Atom type, Window about, long data, long data1 = 0, long data2 = 0, long data3 = 0, long data4 = 0); }