summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-10 03:10:18 +0000
committerDana Jansens <danakj@orodu.net>2003-01-10 03:10:18 +0000
commit0d00827947ef02749d44802613ca13df284e544f (patch)
tree97c5e45e89f963985f9c8cbd10b36453858ad6c8
parent345d957e1ea577480f807b892b73c3f52fe913d2 (diff)
include point and rect from otk so that they can have objects returned instead of strings
-rw-r--r--src/openbox.i27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/openbox.i b/src/openbox.i
index 0f54362b..7322426b 100644
--- a/src/openbox.i
+++ b/src/openbox.i
@@ -27,33 +27,13 @@
%{
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"