1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
11 #include "bindings.hh"
19 //! Add a python callback funtion to the back of the hook list
21 Registering functions for KeyPress events is pointless. Use python_bind
24 bool python_register(int action, PyObject *callback);
25 //! Add a python callback funtion to the front of the hook list
27 Registering functions for KeyPress events is pointless. Use python_bind
30 bool python_preregister(int action, PyObject *callback);
31 //! Remove a python callback function from the hook list
32 bool python_unregister(int action, PyObject *callback);
34 //! Removes all python callback functions from the hook list
35 bool python_unregister_all(int action);
39 @param keylist A python list of modifier/key/buttons, in the form:
40 "C-A-space" or "A-Button1" etc.
41 @param callback A python function to call when the binding is used.
43 bool python_bind(PyObject *keylist, PyObject *callback);
45 bool python_unbind(PyObject *keylist);
47 void python_set_reset_key(const std::string &key);
49 void python_unbind_all();
51 //! Fire a python callback function
52 void python_callback(OBActions::ActionType action, Window window,
53 OBWidget::WidgetType type, unsigned int state,
54 long d1 = LONG_MIN, long d2 = LONG_MIN,
55 long d3 = LONG_MIN, long d4 = LONG_MIN);
57 //! Fire a python callback function for a key binding
58 void python_callback_binding(int id, Window window, unsigned int state,
59 unsigned int keybutton, Time time);