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
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)
static void otkdisplay_dealloc(PyObject* self)
{
XCloseDisplay(((OtkDisplay*) self)->display);
- PyObject_Del(((OtkDisplay*) self)->screenInfoList);
+ Py_DECREF(((OtkDisplay*) self)->screenInfoList);
PyObject_Del(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
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);
}