// This struct manages callbacks into Python. It is stored as the // user data portion of a widget, and the PythonCallback function is // set as the callback. PythonCallback unmarshalls the pointer to // the Python function and Python user data and calls back into // Python. // #ifndef CallbackStruct_h #define CallbackStruct_h #include class CallbackStruct { public: PyObject *func; PyObject *data; void *type; CallbackStruct( PyObject *theFunc, PyObject *theData, void *theType=0): func(theFunc), data(theData), type(theType) {} }; #endif