X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fopenbox.i;h=b88175d90e6565d7f984aa9d080e95fa8988ce25;hb=4721c53868187d10e3732cea63efa9fbd352178d;hp=b5e7f09e4799791ff7cef4a4f4f8fa70e15615e3;hpb=66a26917a0631463df7f72c34cbeb39df466918a;p=chaz%2Fopenbox diff --git a/src/openbox.i b/src/openbox.i index b5e7f09e..b88175d9 100644 --- a/src/openbox.i +++ b/src/openbox.i @@ -28,13 +28,14 @@ %inline %{ enum ActionType { Action_ButtonPress, - Action_ButtonRelease, Action_Click, Action_DoubleClick, Action_EnterWindow, Action_LeaveWindow, Action_KeyPress, - Action_MouseMotion + Action_MouseMotion, + Action_NewWindow, + Action_CloseWindow }; enum WidgetType { Type_Frame, @@ -97,6 +98,10 @@ PyObject * unregister_all(int action) 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;