]> Dogcows Code - chaz/openbox/commitdiff
include point and rect from otk so that they can have objects returned instead of...
authorDana Jansens <danakj@orodu.net>
Fri, 10 Jan 2003 03:10:18 +0000 (03:10 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 10 Jan 2003 03:10:18 +0000 (03:10 +0000)
src/openbox.i

index 0f54362bd14eda1f3879ae4b1bc8410f5d214963..7322426bb9992deaa6790aeb69cb869b5c95634c 100644 (file)
 
 %{
 namespace ob {
-void python_callback(PyObject *func, MotionData *data)
+void python_callback(PyObject *func, MouseData *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)
-{
-  PyObject *arglist;
-  PyObject *result;
-
-  arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
-                                                    SWIGTYPE_p_ob__ButtonData,
+                                                    SWIGTYPE_p_ob__MouseData,
                                                     0));
   
   // call the callback
@@ -132,6 +112,9 @@ void python_callback(PyObject *func, KeyData *data)
 %import "widget.hh"
 %import "actions.hh"
 
+%include "../otk/point.hh"
+%include "../otk/rect.hh"
+
 %include "openbox.hh"
 %include "screen.hh"
 %include "client.hh"
This page took 0.022635 seconds and 4 git commands to generate.