summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Finlay <finlay@src.gnome.org>2003-07-01 20:22:26 +0000
committerJohn Finlay <finlay@src.gnome.org>2003-07-01 20:22:26 +0000
commitbc1bc019aab5494471152808f1e2768768c10ae7 (patch)
tree53f6a73fee4180f36d97922af22fb4638a39489e
parentcf920255c144cdbaa0309f6212caeeac64b1d508 (diff)
downloadpygtk-bc1bc019aab5494471152808f1e2768768c10ae7.tar.gz
Add functions. Fixes #115046.
* gtk/gdk.override (_wrap_gdk_window_get_toplevels) (_wrap_gdk_list_visuals): Add functions. Fixes #115046.
-rw-r--r--gtk/gdk.override54
1 files changed, 54 insertions, 0 deletions
diff --git a/gtk/gdk.override b/gtk/gdk.override
index dd3e2795..183c6859 100644
--- a/gtk/gdk.override
+++ b/gtk/gdk.override
@@ -3007,3 +3007,57 @@ _wrap_gdk_window_get_decorations(PyGObject *self)
return PyInt_FromLong(decor);
}
+%%
+override gdk_window_get_toplevels noargs
+static PyObject *
+_wrap_gdk_window_get_toplevels(PyGObject *self)
+{
+ GList *topl;
+ guint ntopl;
+ int i;
+ PyObject *list;
+
+ topl = gdk_window_get_toplevels();
+ ntopl = g_list_length(topl);
+
+ if ((list = PyList_New(ntopl)) == NULL)
+ return NULL;
+
+ for (i = 0; i < ntopl; i++) {
+ PyObject *item;
+
+ item = pygobject_new((GObject *)g_list_nth_data(topl, i));
+ PyList_SetItem(list, i, item);
+ }
+
+ g_list_free(topl);
+
+ return list;
+}
+%%
+override gdk_list_visuals noargs
+static PyObject *
+_wrap_gdk_list_visuals(PyGObject *self)
+{
+ GList *visl;
+ guint nvisl;
+ int i;
+ PyObject *list;
+
+ visl = gdk_list_visuals();
+ nvisl = g_list_length(visl);
+
+ if ((list = PyList_New(nvisl)) == NULL)
+ return NULL;
+
+ for (i = 0; i < nvisl; i++) {
+ PyObject *item;
+
+ item = pygobject_new((GObject *)g_list_nth_data(visl, i));
+ PyList_SetItem(list, i, item);
+ }
+
+ g_list_free(visl);
+
+ return list;
+}