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,
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;
static swig_const_info swig_const_table[] = {
{ SWIG_PY_INT, (char *)"Action_ButtonPress", (long) Action_ButtonPress, 0, 0, 0},
-{ SWIG_PY_INT, (char *)"Action_ButtonRelease", (long) Action_ButtonRelease, 0, 0, 0},
{ SWIG_PY_INT, (char *)"Action_Click", (long) Action_Click, 0, 0, 0},
{ SWIG_PY_INT, (char *)"Action_DoubleClick", (long) Action_DoubleClick, 0, 0, 0},
{ SWIG_PY_INT, (char *)"Action_EnterWindow", (long) Action_EnterWindow, 0, 0, 0},
{ SWIG_PY_INT, (char *)"Action_LeaveWindow", (long) Action_LeaveWindow, 0, 0, 0},
{ SWIG_PY_INT, (char *)"Action_KeyPress", (long) Action_KeyPress, 0, 0, 0},
{ SWIG_PY_INT, (char *)"Action_MouseMotion", (long) Action_MouseMotion, 0, 0, 0},
+{ SWIG_PY_INT, (char *)"Action_NewWindow", (long) Action_NewWindow, 0, 0, 0},
+{ SWIG_PY_INT, (char *)"Action_CloseWindow", (long) Action_CloseWindow, 0, 0, 0},
{ SWIG_PY_INT, (char *)"Type_Frame", (long) Type_Frame, 0, 0, 0},
{ SWIG_PY_INT, (char *)"Type_Titlebar", (long) Type_Titlebar, 0, 0, 0},
{ SWIG_PY_INT, (char *)"Type_Handle", (long) Type_Handle, 0, 0, 0},