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