summaryrefslogtreecommitdiff
path: root/otk
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-07 02:24:43 +0000
committerDana Jansens <danakj@orodu.net>2003-01-07 02:24:43 +0000
commit711a7d8c5623814c374ed6f56476bc616cb9391f (patch)
treed57e347fb2a2c53aee52c5a1f9aebb6719a260b6 /otk
parentd7cc09cebd23e052f230414f0ad7fb385e3cd2ef (diff)
supply python routines for next/prev workspace
Diffstat (limited to 'otk')
-rw-r--r--otk/display.cc10
-rw-r--r--otk/display.hh2
-rw-r--r--otk/otk_wrap.cc20
3 files changed, 32 insertions, 0 deletions
diff --git a/otk/display.cc b/otk/display.cc
index 3a15ff22..21ffcd5d 100644
--- a/otk/display.cc
+++ b/otk/display.cc
@@ -176,6 +176,16 @@ const ScreenInfo* OBDisplay::screenInfo(int snum) {
}
+const ScreenInfo* OBDisplay::findScreen(Window root)
+{
+ ScreenInfoList::iterator it, end = _screenInfoList.end();
+ for (it = _screenInfoList.begin(); it != end; ++it)
+ if (it->rootWindow() == root)
+ return &(*it);
+ return 0;
+}
+
+
void OBDisplay::grab()
{
if (_grab_count == 0)
diff --git a/otk/display.hh b/otk/display.hh
index 0fbf2b34..ee8fecbd 100644
--- a/otk/display.hh
+++ b/otk/display.hh
@@ -96,6 +96,8 @@ public:
*/
static const ScreenInfo* screenInfo(int snum);
+ static const ScreenInfo* findScreen(Window root);
+
//! Returns if the display has the shape extention available
inline static bool shape() { return _shape; }
//! Returns the shape extension's event base
diff --git a/otk/otk_wrap.cc b/otk/otk_wrap.cc
index dc49a85b..c8d4b60f 100644
--- a/otk/otk_wrap.cc
+++ b/otk/otk_wrap.cc
@@ -5497,6 +5497,25 @@ static PyObject *_wrap_OBDisplay_screenInfo(PyObject *self, PyObject *args) {
}
+static PyObject *_wrap_OBDisplay_findScreen(PyObject *self, PyObject *args) {
+ PyObject *resultobj;
+ Window arg1 ;
+ otk::ScreenInfo *result;
+ Window *argp1 ;
+ PyObject * obj0 = 0 ;
+
+ if(!PyArg_ParseTuple(args,(char *)"O:OBDisplay_findScreen",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &argp1, SWIGTYPE_p_Window,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail;
+ arg1 = *argp1;
+ result = (otk::ScreenInfo *)otk::OBDisplay::findScreen(arg1);
+
+ resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__ScreenInfo, 0);
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
static PyObject *_wrap_OBDisplay_shape(PyObject *self, PyObject *args) {
PyObject *resultobj;
bool result;
@@ -13066,6 +13085,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"OBDisplay_destroy", _wrap_OBDisplay_destroy, METH_VARARGS },
{ (char *)"OBDisplay_gcCache", _wrap_OBDisplay_gcCache, METH_VARARGS },
{ (char *)"OBDisplay_screenInfo", _wrap_OBDisplay_screenInfo, METH_VARARGS },
+ { (char *)"OBDisplay_findScreen", _wrap_OBDisplay_findScreen, METH_VARARGS },
{ (char *)"OBDisplay_shape", _wrap_OBDisplay_shape, METH_VARARGS },
{ (char *)"OBDisplay_shapeEventBase", _wrap_OBDisplay_shapeEventBase, METH_VARARGS },
{ (char *)"OBDisplay_xinerama", _wrap_OBDisplay_xinerama, METH_VARARGS },