include point and rect from otk so that they can have objects returned instead of strings
Dana Jansens danakj@orodu.net
1 files changed,
5 insertions(+),
22 deletions(-)
jump to
M
src/openbox.i
→
src/openbox.i
@@ -27,33 +27,13 @@ %};
%{ namespace ob { -void python_callback(PyObject *func, MotionData *data) -{ - PyObject *arglist; - PyObject *result; - - arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data, - SWIGTYPE_p_ob__MotionData, - 0)); - - // call the callback - result = PyEval_CallObject(func, arglist); - if (!result || PyErr_Occurred()) { - // an exception occured in the script, display it - PyErr_Print(); - } - - Py_XDECREF(result); - Py_DECREF(arglist); -} - -void python_callback(PyObject *func, ButtonData *data) +void python_callback(PyObject *func, MouseData *data) { PyObject *arglist; PyObject *result; arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data, - SWIGTYPE_p_ob__ButtonData, + SWIGTYPE_p_ob__MouseData, 0)); // call the callback@@ -131,6 +111,9 @@ %import "../otk/eventdispatcher.hh"
%import "../otk/eventhandler.hh" %import "widget.hh" %import "actions.hh" + +%include "../otk/point.hh" +%include "../otk/rect.hh" %include "openbox.hh" %include "screen.hh"