%{
/*
Calls a python callback for the MouseCallback function type
*/
static void PythonMouseCallback(ob::MouseData *data, void *pyfunc)
{
%{
/*
Calls a python callback for the MouseCallback function type
*/
static void PythonMouseCallback(ob::MouseData *data, void *pyfunc)
{
- PyObject *func, *arglist, *pdata;
- PyObject *result;
- double dres = 0;
-
- func = (PyObject*) pyfunc;
+ PyObject *arglist, *pdata, *result;
pdata = SWIG_NewPointerObj((void *) data, SWIGTYPE_p_ob__MouseData, 0);
arglist = Py_BuildValue("(O)", pdata);
Py_DECREF(pdata);
// call the callback
pdata = SWIG_NewPointerObj((void *) data, SWIGTYPE_p_ob__MouseData, 0);
arglist = Py_BuildValue("(O)", pdata);
Py_DECREF(pdata);
// call the callback
if (!result || PyErr_Occurred()) {
// an exception occured in the script, display it
PyErr_Print();
if (!result || PyErr_Occurred()) {
// an exception occured in the script, display it
PyErr_Print();
- PyObject *func, *arglist, *pdata;
- PyObject *result;
- double dres = 0;
-
- func = (PyObject*) pyfunc;
+ PyObject *arglist, *pdata, *result;
pdata = SWIG_NewPointerObj((void *) data, SWIGTYPE_p_ob__KeyData, 0);
arglist = Py_BuildValue("(O)", pdata);
Py_DECREF(pdata);
// call the callback
pdata = SWIG_NewPointerObj((void *) data, SWIGTYPE_p_ob__KeyData, 0);
arglist = Py_BuildValue("(O)", pdata);
Py_DECREF(pdata);
// call the callback
if (!result || PyErr_Occurred()) {
// an exception occured in the script, display it
PyErr_Print();
if (!result || PyErr_Occurred()) {
// an exception occured in the script, display it
PyErr_Print();
- PyObject *func, *arglist, *pdata;
- PyObject *result;
- double dres = 0;
-
- func = (PyObject*) pyfunc;
+ PyObject *arglist, *pdata, *result;
pdata = SWIG_NewPointerObj((void *) data, SWIGTYPE_p_ob__EventData, 0);
arglist = Py_BuildValue("(O)", pdata);
Py_DECREF(pdata);
// call the callback
pdata = SWIG_NewPointerObj((void *) data, SWIGTYPE_p_ob__EventData, 0);
arglist = Py_BuildValue("(O)", pdata);
Py_DECREF(pdata);
// call the callback
if (!result || PyErr_Occurred()) {
// an exception occured in the script, display it
PyErr_Print();
if (!result || PyErr_Occurred()) {
// an exception occured in the script, display it
PyErr_Print();
bool mbind(const std::string &button, ob::MouseContext::MC context,
ob::MouseAction::MA action, PyObject *func)
{
bool mbind(const std::string &button, ob::MouseContext::MC context,
ob::MouseAction::MA action, PyObject *func)
{