X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbindings.hh;h=8e91b5b681323acb63fe4b48c39f2aca0d44a400;hb=527697d6aee92ab3780eb34af158ac9d2207939c;hp=71df301105343c8fc1eeaf8fe37bbde8c757fc9b;hpb=f8ea576460470ecc2e395cf43e31a67752adbbb5;p=chaz%2Fopenbox diff --git a/src/bindings.hh b/src/bindings.hh index 71df3011..8e91b5b6 100644 --- a/src/bindings.hh +++ b/src/bindings.hh @@ -84,6 +84,8 @@ private: void grabButton(bool grab, const Binding &b, MouseContext context, OBClient *client); + + PyObject *_events[NUM_EVENTS]; public: //! Initializes an OBBindings object @@ -127,6 +129,17 @@ public: void removeAllButtons(); void fireButton(ButtonData *data); + + //! Bind a callback for an event + bool addEvent(EventAction action, PyObject *callback); + + //! Unbind the callback function from an event + bool removeEvent(EventAction action); + + //! Remove all callback functions + void removeAllEvents(); + + void fireEvent(EventData *data); }; }