bool chain; // true if this is a chain to another key (not an action)
struct KeyBindingTree *next_sibling; // the next binding in the tree at the same
// level
struct KeyBindingTree *first_child; // the first child of this binding (next
// binding in a chained sequence).
bool chain; // true if this is a chain to another key (not an action)
struct KeyBindingTree *next_sibling; // the next binding in the tree at the same
// level
struct KeyBindingTree *first_child; // the first child of this binding (next
// binding in a chained sequence).
- PyObject *callback[NUM_MOUSE_ACTION];
- ButtonBinding() : binding(0, 0) {
- for(int i=0; i<NUM_MOUSE_ACTION; ++i) callback[i] = 0;
- }
+ CallbackList callbacks[NUM_MOUSE_ACTION];
+ ButtonBinding() : binding(0, 0) {}
KeyBindingTree *buildtree(const StringVect &keylist,
PyObject *callback) const;
void assimilate(KeyBindingTree *node);
KeyBindingTree *buildtree(const StringVect &keylist,
PyObject *callback) const;
void assimilate(KeyBindingTree *node);
typedef std::list <ButtonBinding*> ButtonBindingList;
ButtonBindingList _buttons[NUM_MOUSE_CONTEXT];
void grabButton(bool grab, const Binding &b, MouseContext context,
typedef std::list <ButtonBinding*> ButtonBindingList;
ButtonBindingList _buttons[NUM_MOUSE_CONTEXT];
void grabButton(bool grab, const Binding &b, MouseContext context,
//! Translates a binding string into the actual Binding
bool translate(const std::string &str, Binding &b, bool askey = true) const;
//! Translates a binding string into the actual Binding
bool translate(const std::string &str, Binding &b, bool askey = true) const;
- void fireKey(unsigned int modifiers,unsigned int key, Time time);
+ void fireKey(int screen, unsigned int modifiers,unsigned int key, Time time);
bool addButton(const std::string &but, MouseContext context,
MouseAction action, PyObject *callback);
bool addButton(const std::string &but, MouseContext context,
MouseAction action, PyObject *callback);
//! Bind a callback for an event
bool addEvent(EventAction action, PyObject *callback);
//! Unbind the callback function from an event
//! Bind a callback for an event
bool addEvent(EventAction action, PyObject *callback);
//! Unbind the callback function from an event