summaryrefslogtreecommitdiffstats
path: root/xutils.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2008-06-23 11:58:37 -0400
committerPeter Jones <pjones@vroomfondel.internal.datastacks.com>2008-06-23 11:59:22 -0400
commit08a261a30351e8fd7f1df4a974576b737ce8899b (patch)
treeb54cc117b06b4081b46e597b017e42020f41f1cc /xutils.c
parent2cf3111d014b62e180abe37ce91a44d0a3a5ce64 (diff)
downloadanaconda-08a261a30351e8fd7f1df4a974576b737ce8899b.tar.gz
anaconda-08a261a30351e8fd7f1df4a974576b737ce8899b.tar.xz
anaconda-08a261a30351e8fd7f1df4a974576b737ce8899b.zip
Remove the stuff we're not calling.
Diffstat (limited to 'xutils.c')
-rw-r--r--xutils.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/xutils.c b/xutils.c
index 025010f15..372ffca15 100644
--- a/xutils.c
+++ b/xutils.c
@@ -24,18 +24,12 @@
#include <X11/Xatom.h>
#include <gdk/gdkx.h>
-static PyObject * getRootResources(PyObject *s, PyObject *args);
static PyObject * setRootResource(PyObject * s, PyObject * args);
-static PyObject * screenHeight (PyObject * s, PyObject * args);
-static PyObject * screenWidth (PyObject * s, PyObject * args);
static PyObject * getXatom(PyObject *s, PyObject *args);
static PyMethodDef xutilsMethods[] = {
- { "getRootResources", getRootResources, 1, NULL },
{ "setRootResource", setRootResource, 1, NULL },
- { "screenHeight", screenHeight, 1, NULL },
- { "screenWidth", screenWidth, 1, NULL },
{ "getXatom", getXatom, 1, NULL },
{ NULL, NULL, 0, NULL }
};
@@ -44,7 +38,6 @@ typedef struct _Resource {
char *key, *val;
} Resource;
-
static int
openDisplay(Display **dpy, Window *root)
{
@@ -153,39 +146,6 @@ freeResources(Resource **rc)
free(rc);
}
-/* return dictionary of resources on root display */
-PyObject *
-getRootResources(PyObject *s, PyObject *args) {
- Display *dpy;
- Window root;
- Resource **resources, **p;
- PyObject *rc;
-
- if (openDisplay(&dpy, &root) < 0) {
- PyErr_SetString(PyExc_SystemError, "Could not open display.");
- return NULL;
- }
-
- resources = getCurrentResources(dpy);
- if (!resources) {
- closeDisplay(dpy);
- Py_INCREF(Py_None);
- return Py_None;
- }
-
- rc = PyDict_New();
- p = resources;
- while (*p) {
- PyDict_SetItemString(rc, (*p)->key, Py_BuildValue("s", (*p)->val));
- p++;
- }
-
- freeResources(resources);
- closeDisplay(dpy);
-
- return rc;
-}
-
static PyObject *
setRootResource(PyObject *s, PyObject *args)
{
@@ -279,48 +239,6 @@ setRootResource(PyObject *s, PyObject *args)
return Py_None;
}
-static PyObject *
-screenHeight(PyObject *s, PyObject *args)
-{
- Display *dpy;
- Window root;
- int scrn;
- PyObject *rc;
-
- if (openDisplay(&dpy, &root) < 0) {
- PyErr_SetString(PyExc_SystemError, "Could not open display.");
- return NULL;
- }
-
- scrn=DefaultScreen(dpy);
-
- rc = Py_BuildValue("i", DisplayHeight(dpy, scrn));
-
- closeDisplay(dpy);
- return rc;
-}
-
-static PyObject *
-screenWidth(PyObject *s, PyObject *args)
-{
- Display *dpy;
- Window root;
- int scrn;
- PyObject *rc;
-
- if (openDisplay(&dpy, &root) < 0) {
- PyErr_SetString(PyExc_SystemError, "Could not open display.");
- return NULL;
- }
-
- scrn=DefaultScreen(dpy);
-
- rc = Py_BuildValue("i", DisplayWidth(dpy, scrn));
-
- closeDisplay(dpy);
- return rc;
-}
-
/* this assumes you've already imported gtk and thus have a display */
static PyObject *
getXatom(PyObject *s, PyObject *args)