color and gccache etc are like, half done
This commit is contained in:
parent
8d3d9ae75c
commit
79ce13073b
4 changed files with 14 additions and 6 deletions
|
@ -3,8 +3,8 @@ exec_prefix=$(prefix)
|
||||||
libdir=$(exec_prefix)/lib
|
libdir=$(exec_prefix)/lib
|
||||||
|
|
||||||
targets = libotk.so libotk.a
|
targets = libotk.so libotk.a
|
||||||
sources = display.c screeninfo.c rect.c
|
sources = display.c screeninfo.c rect.c gccache.c
|
||||||
headers = display.h screeninfo.h rect.h
|
headers = display.h screeninfo.h rect.h gccache.h
|
||||||
|
|
||||||
CFLAGS+=-I/usr/gwar/include/python2.2
|
CFLAGS+=-I/usr/gwar/include/python2.2
|
||||||
|
|
||||||
|
|
|
@ -143,6 +143,11 @@ void OtkDisplay_Ungrab(OtkDisplay *self)
|
||||||
XUngrabServer(self->display);
|
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 PyObject *otkdisplay_grab(OtkDisplay* self, PyObject* args)
|
||||||
|
@ -174,7 +179,7 @@ static PyMethodDef get_methods[] = {
|
||||||
static void otkdisplay_dealloc(PyObject* self)
|
static void otkdisplay_dealloc(PyObject* self)
|
||||||
{
|
{
|
||||||
XCloseDisplay(((OtkDisplay*) self)->display);
|
XCloseDisplay(((OtkDisplay*) self)->display);
|
||||||
PyObject_Del(((OtkDisplay*) self)->screenInfoList);
|
Py_DECREF(((OtkDisplay*) self)->screenInfoList);
|
||||||
PyObject_Del(self);
|
PyObject_Del(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,4 +61,7 @@ void OtkDisplay_Grab(OtkDisplay *self);
|
||||||
//! Ungrabs the display
|
//! Ungrabs the display
|
||||||
void OtkDisplay_Ungrab(OtkDisplay *self);
|
void OtkDisplay_Ungrab(OtkDisplay *self);
|
||||||
|
|
||||||
|
//! Get the screen info for a specific screen
|
||||||
|
struct OtkScreenInfo *OtkDisplay_ScreenInfo(OtkDisplay *self, int num);
|
||||||
|
|
||||||
#endif // __display_h
|
#endif // __display_h
|
||||||
|
|
|
@ -162,10 +162,10 @@ static PyMethodDef get_methods[] = {
|
||||||
|
|
||||||
static void otkscreeninfo_dealloc(PyObject* self)
|
static void otkscreeninfo_dealloc(PyObject* self)
|
||||||
{
|
{
|
||||||
PyObject_Del(((OtkScreenInfo*) self)->display_string);
|
Py_DECREF(((OtkScreenInfo*) self)->display_string);
|
||||||
PyObject_Del(((OtkScreenInfo*) self)->rect);
|
Py_DECREF(((OtkScreenInfo*) self)->rect);
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
PyObject_Del(((OtkScreenInfo*) self)->xinerama_areas);
|
Py_DECREF(((OtkScreenInfo*) self)->xinerama_areas);
|
||||||
#endif
|
#endif
|
||||||
PyObject_Del(self);
|
PyObject_Del(self);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue