#ifndef __binding_hh
#define __binding_hh
-/*! @file binding.hh
+/*! @file bindings.hh
@brief I dunno.. some binding stuff?
*/
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 <ButtonBinding*> 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();
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);
};
}