X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbindings.hh;fp=src%2Fbindings.hh;h=8e91b5b681323acb63fe4b48c39f2aca0d44a400;hb=a9a5f0d7510be5dbf8ae1db99e6c1c01035503d9;hp=71df301105343c8fc1eeaf8fe37bbde8c757fc9b;hpb=a0350e27b311db5cab49035752d3852ee68bf8a2;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); }; }