James Henstridge wrote:
> The binding for gdk_window_raise is missing in the current release.
> To get the GdkWindow of a widget use the get_window() method. I will
> probably add a raise() method to GdkWindow objects.
I've just added raise and lower methods to GdkWindow objects on my local
copy of pygtk, and I noticed that you can't have (or more importantly,
you can't call) a method called 'raise' with C Python. I ended up
naming
it '_raise', which seems a bit hacky but works and fits in with
_[23]BUTTON_PRESS in GDK.py
The patch, if anyone wants it, is:
--- gtkmodule.c.orig Tue Aug 31 14:38:53 1999
+++ gtkmodule.c Tue Aug 31 15:30:14 1999
@@ -1489,12 +1489,28 @@
return Py_None;
}
+static PyObject *PyGdkWindow_Raise(PyGdkWindow_Object *self, PyObject
*args) {
+ if (!PyArg_ParseTuple(args, ":GdkWindow._raise"))
+ return NULL;
+ gdk_window_raise(self->obj);
+ return Py_None;
+}
+
+static PyObject *PyGdkWindow_Lower(PyGdkWindow_Object *self, PyObject
*args) {
+ if (!PyArg_ParseTuple(args, ":GdkWindow.lower"))
+ return NULL;
+ gdk_window_lower(self->obj);
+ return Py_None;
+}
+
static PyMethodDef PyGdkWindow_methods[] = {
{"new_gc", (PyCFunction)PyGdkWindow_NewGC,
METH_VARARGS|METH_KEYWORDS, NULL},
{"set_cursor", (PyCFunction)PyGdkWindow_SetCursor, METH_VARARGS,
NULL},
{"property_get", (PyCFunction)PyGdkWindow_PropertyGet, METH_VARARGS,
NULL},
{"property_change", (PyCFunction)PyGdkWindow_PropertyChange,
METH_VARARGS, NULL},
{"property_delete", (PyCFunction)PyGdkWindow_PropertyDelete,
METH_VARARGS, NULL},
+ {"_raise", (PyCFunction)PyGdkWindow_Raise, METH_VARARGS, NULL},
+ {"lower", (PyCFunction)PyGdkWindow_Lower, METH_VARARGS, NULL},
{NULL, 0, 0, NULL}
};
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]