]> Dogcows Code - chaz/openbox/commitdiff
color and gccache etc are like, half done
authorDana Jansens <danakj@orodu.net>
Sat, 21 Dec 2002 00:46:25 +0000 (00:46 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 21 Dec 2002 00:46:25 +0000 (00:46 +0000)
otk_c/Makefile
otk_c/display.c
otk_c/display.h
otk_c/screeninfo.c

index 9a93825d32b15c6869a1b32f5d18a5b90d70d28b..960308c6586ee3f08fa3fa09227c6e75370ac5d1 100644 (file)
@@ -3,8 +3,8 @@ exec_prefix=$(prefix)
 libdir=$(exec_prefix)/lib
 
 targets = libotk.so libotk.a
-sources = display.c screeninfo.c rect.c
-headers = display.h screeninfo.h rect.h
+sources = display.c screeninfo.c rect.c gccache.c
+headers = display.h screeninfo.h rect.h gccache.h
 
 CFLAGS+=-I/usr/gwar/include/python2.2
 
index 85965210e4fe9a6196f0b6bf855af889a837ad7e..47b1191ff96a9c1dec36e31991fd01e7b98ab5f5 100644 (file)
@@ -143,6 +143,11 @@ void OtkDisplay_Ungrab(OtkDisplay *self)
     XUngrabServer(self->display);
 }
 
+OtkScreenInfo *OtkDisplay_ScreenInfo(OtkDisplay *self, int num)
+{
+  PyObject *py = PyList_GetItem(self->screenInfoList, num);
+  return (OtkScreenInfo*) py;
+}
 
 
 static PyObject *otkdisplay_grab(OtkDisplay* self, PyObject* args)
@@ -174,7 +179,7 @@ static PyMethodDef get_methods[] = {
 static void otkdisplay_dealloc(PyObject* self)
 {
   XCloseDisplay(((OtkDisplay*) self)->display);
-  PyObject_Del(((OtkDisplay*) self)->screenInfoList);
+  Py_DECREF(((OtkDisplay*) self)->screenInfoList);
   PyObject_Del(self);
 }
 
index 87574b761d147f5d9aea136565a790d8a62b0dde..a59d8482998e0c8f230d7e7ba7cf49f7933b021c 100644 (file)
@@ -61,4 +61,7 @@ void OtkDisplay_Grab(OtkDisplay *self);
 //! Ungrabs the display
 void OtkDisplay_Ungrab(OtkDisplay *self);
 
+//! Get the screen info for a specific screen
+struct OtkScreenInfo *OtkDisplay_ScreenInfo(OtkDisplay *self, int num);
+
 #endif // __display_h
index 0153d7f74d5177c7d32750286717914d5534ec6f..fb0de49822035b9be5ff323f5b02218084c301b4 100644 (file)
@@ -162,10 +162,10 @@ static PyMethodDef get_methods[] = {
 
 static void otkscreeninfo_dealloc(PyObject* self)
 {
-  PyObject_Del(((OtkScreenInfo*) self)->display_string);
-  PyObject_Del(((OtkScreenInfo*) self)->rect);
+  Py_DECREF(((OtkScreenInfo*) self)->display_string);
+  Py_DECREF(((OtkScreenInfo*) self)->rect);
 #ifdef XINERAMA
-  PyObject_Del(((OtkScreenInfo*) self)->xinerama_areas);
+  Py_DECREF(((OtkScreenInfo*) self)->xinerama_areas);
 #endif
   PyObject_Del(self);
 }
This page took 0.029685 seconds and 4 git commands to generate.