X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbindings.hh;h=8e91b5b681323acb63fe4b48c39f2aca0d44a400;hb=1f8b8425ae82c2c086f6648b7608b37685997634;hp=280c77cd95702aed374c32a942ee6cea494ec7d8;hpb=c89a13d5dee4bf5f2e7d79452d4738595454b0c4;p=chaz%2Fopenbox diff --git a/src/bindings.hh b/src/bindings.hh index 280c77cd..8e91b5b6 100644 --- a/src/bindings.hh +++ b/src/bindings.hh @@ -77,11 +77,16 @@ private: PyObject *callback) const; void assimilate(KeyBindingTree *node); - static void reset(OBBindings *self); // the timer's timeout function + static void resetChains(OBBindings *self); // the timer's timeout function typedef std::list ButtonBindingList; ButtonBindingList _buttons[NUM_MOUSE_CONTEXT]; + void grabButton(bool grab, const Binding &b, MouseContext context, + OBClient *client); + + PyObject *_events[NUM_EVENTS]; + public: //! Initializes an OBBindings object OBBindings(); @@ -124,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); }; }