X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fpython.hh;h=77a7bf5c676a02e4ae1c7bbc0627402f4dbb4b66;hb=f51f1c775f3f09cf184ead323d111985c888d52e;hp=90df3e10c34118e1b2a4c44db9f61cbcedaa47e8;hpb=3b39804835c1edc5df63ac42d39dd4741087a975;p=chaz%2Fopenbox diff --git a/src/python.hh b/src/python.hh index 90df3e10..77a7bf5c 100644 --- a/src/python.hh +++ b/src/python.hh @@ -81,7 +81,7 @@ struct EventAction { EnterWindow, //!< Occurs when the mouse enters a window LeaveWindow, //!< Occurs when the mouse leaves a window //! Occurs while a window is being managed. The handler should call - //! Client::move to the window + //! Client::move on the window PlaceWindow, //! Occurs while a window is being managed, just before the window is //! displayed @@ -121,7 +121,7 @@ struct EventAction { */ UrgentWindow #if ! (defined(DOXYGEN_IGNORE) || defined(SWIG)) - , NUM_EVENTS + , NUM_EVENT_ACTION #endif }; }; @@ -222,6 +222,11 @@ public: } }; +// The void*'s will be used to hold the native language's function pointer +typedef void (*MouseCallback)(MouseData*, void*); +typedef void (*KeyCallback)(KeyData*, void*); +typedef void (*EventCallback)(EventData*, void*); + #ifndef SWIG void python_init(char *argv0); @@ -232,34 +237,8 @@ bool python_get_long(const char *name, long *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 * - ***********************************************/ -void python_callback(PyObject *func, MouseData *data); -void python_callback(PyObject *func, EventData *data); -void python_callback(PyObject *func, KeyData *data); - #endif // SWIG -PyObject *mbind(const std::string &button, ob::MouseContext::MC context, - ob::MouseAction::MA action, PyObject *func); - -PyObject *kbind(PyObject *keylist, ob::KeyContext::KC context, PyObject *func); - -PyObject *kgrab(int screen, PyObject *func); -PyObject *kungrab(); - -PyObject *ebind(ob::EventAction::EA action, PyObject *func); - -void set_reset_key(const std::string &key); - -PyObject *send_client_msg(Window target, Atom type, Window about, - long data, long data1 = 0, long data2 = 0, - long data3 = 0, long data4 = 0); - - -void execute(const std::string &bin, int screen=0); - }