add the global display variable
authorDana Jansens <danakj@orodu.net>
Mon, 13 Jan 2003 10:08:44 +0000 (10:08 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 13 Jan 2003 10:08:44 +0000 (10:08 +0000)
src/openbox.i
src/openbox.py
src/openbox_wrap.cc

index ef86b9b..657e31b 100644 (file)
@@ -110,6 +110,9 @@ void python_callback(PyObject *func, KeyData *data)
 };
 
 %ignore otk::display;
+%inline %{
+  otk::Display *Display_instance() { return otk::display; }
+%};
 
 %include "../otk/ustring.i"
 
index 1f263d3..1d7e410 100644 (file)
@@ -29,6 +29,8 @@ except AttributeError:
 
 Openbox_instance = _openbox.Openbox_instance
 
+Display_instance = _openbox.Display_instance
+
 class Display(_object):
     __swig_setmethods__ = {}
     __setattr__ = lambda self, name, value: _swig_setattr(self, Display, name, value)
index 4a66d95..4d1136c 100644 (file)
@@ -883,6 +883,9 @@ void python_callback(PyObject *func, KeyData *data)
   #include <iterator>
 
 
+  otk::Display *Display_instance() { return otk::display; }
+
+
 #include "ustring.hh"
 
 ob::Client *ob_Screen_client(ob::Screen *self,int i){
@@ -912,6 +915,20 @@ static PyObject *_wrap_Openbox_instance(PyObject *self, PyObject *args) {
 }
 
 
+static PyObject *_wrap_Display_instance(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    otk::Display *result;
+    
+    if(!PyArg_ParseTuple(args,(char *)":Display_instance")) goto fail;
+    result = (otk::Display *)Display_instance();
+    
+    resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__Display, 0);
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_new_Display(PyObject *self, PyObject *args) {
     PyObject *resultobj;
     otk::Display *result;
@@ -7953,6 +7970,7 @@ static PyObject *_wrap_send_client_msg(PyObject *self, PyObject *args) {
 
 static PyMethodDef SwigMethods[] = {
         { (char *)"Openbox_instance", _wrap_Openbox_instance, METH_VARARGS },
+        { (char *)"Display_instance", _wrap_Display_instance, METH_VARARGS },
         { (char *)"new_Display", _wrap_new_Display, METH_VARARGS },
         { (char *)"delete_Display", _wrap_delete_Display, METH_VARARGS },
         { (char *)"Display_gcCache", _wrap_Display_gcCache, METH_VARARGS },