%inline %{
enum ActionType {
Action_ButtonPress,
- Action_ButtonRelease,
Action_Click,
Action_DoubleClick,
Action_EnterWindow,
PyObject * bind(PyObject *keylist, PyObject *func)
{
+ if (!PyCallable_Check(func)) {
+ PyErr_SetString(PyExc_TypeError, "Invalid callback function.");
+ return NULL;
+ }
if (!PyList_Check(keylist)) {
PyErr_SetString(PyExc_TypeError, "Invalid keylist. Not a list.");
return NULL;