[pygtk] show and hide for GdkWindow objects

Jon Nelson jnelson@securepipe.com
Thu, 24 Aug 2000 09:52:23 -0500


This is a multipart MIME message.

--==_Exmh_-7165478000
Content-Type: text/plain; charset=us-ascii

Included is a patch for pygtk-0.6.6 which adds show and hide for GdkWindow 
objects.
They are necessary for uniconifying and iconifying (respectively).
This is an expansion on a previous patch I sent in.



--==_Exmh_-7165478000
Content-Type: application/x-patch ; name="pygtk-0.6.6.patch"
Content-Description: pygtk-0.6.6.patch
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="pygtk-0.6.6.patch"

diff -u -r ./gtkmodule.c ../pygtk-0.6.6/gtkmodule.c
--- ./gtkmodule.c	Fri Apr  7 05:27:22 2000
+++ ../pygtk-0.6.6/gtkmodule.c	Thu Aug 24 09:48:23 2000
@@ -1655,6 +1655,24 @@
   return Py_None;
 }
 =

+static PyObject *PyGdkWindow_Show(PyGdkWindow_Object *self,
+                                  PyObject *args) {
+  if (!PyArg_ParseTuple(args, ":GdkWindow.show"))
+    return NULL;
+  gdk_window_show(self->obj);
+  Py_INCREF(Py_None);
+  return Py_None;
+}
+
+static PyObject *PyGdkWindow_Hide(PyGdkWindow_Object *self,
+				   PyObject *args) {
+  if (!PyArg_ParseTuple(args, ":GdkWindow.hide"))
+    return NULL;
+  gdk_window_hide(self->obj);
+  Py_INCREF(Py_None);
+  return Py_None;
+}
+
 static PyObject *PyGdkWindow_InputGetPointer(PyGdkWindow_Object *self,
 					     PyObject *args) {
   guint32 deviceid;
@@ -1737,6 +1755,8 @@
   {"property_delete", (PyCFunction)PyGdkWindow_PropertyDelete, METH_VARA=
RGS, NULL},
   {"_raise", (PyCFunction)PyGdkWindow_Raise, METH_VARARGS, NULL},
   {"lower", (PyCFunction)PyGdkWindow_Lower, METH_VARARGS, NULL},
+  {"show", (PyCFunction)PyGdkWindow_Show, METH_VARARGS, NULL},
+  {"hide", (PyCFunction)PyGdkWindow_Hide, METH_VARARGS, NULL},
   {"input_get_pointer", (PyCFunction)PyGdkWindow_InputGetPointer, METH_V=
ARARGS, NULL},
   {"pointer_grab", (PyCFunction)PyGdkWindow_PointerGrab, METH_VARARGS, N=
ULL},
   {"pointer_ungrab", (PyCFunction)PyGdkWindow_PointerUngrab, METH_VARARG=
S, NULL},
Only in ../pygtk-0.6.6: gtkmodule.c.orig

--==_Exmh_-7165478000
Content-Type: text/plain; charset=us-ascii

Jon Nelson              \|/ ____ \|/
jnelson@securepipe.com  "@'/ ,. \`@"
C and Python Programmer /_| \__/ |_\
Motorcycle Enthusiast      \__U_/
--==_Exmh_-7165478000--