com gtk/php-gtk: - Moving get_from_tip_window to the right class - GtkWindow::list_toplevels(): ext/gtk+/gtk.defs ext/gtk+/gtk.overrides

[email protected] (David Soria Parra)
Newsgroups php.gtk.cvs
Message-ID <[email protected]>
Commit:    5214725ce3567148c20b84fba09f255f3363acdb
Author:    Christian Weiske <[email protected]>         Tue, 13 Jun 2006 11:06:37 +0000
Parents:   341f096d87c53180c78a9b08d373f33f9ca62851
Branches:  master

Link:       http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=5214725ce3567148c20b84fba09f255f3363acdb

Log:
- Moving get_from_tip_window to the right class
- GtkWindow::list_toplevels()

Changed paths:
  M  ext/gtk+/gtk.defs
  M  ext/gtk+/gtk.overrides


Diff:
5214725ce3567148c20b84fba09f255f3363acdb
diff --git a/ext/gtk+/gtk.defs b/ext/gtk+/gtk.defs
index 95f2c05..c6681da 100644
--- a/ext/gtk+/gtk.defs
+++ b/ext/gtk+/gtk.defs
@@ -17504,8 +17504,8 @@
   (return-type "none")
 )
 
-(define-method tooltips_get_info_from_tip_window
-  (of-object "GtkWindow")
+(define-method get_info_from_tip_window
+  (of-object "GtkTooltips")
   (c-name "gtk_tooltips_get_info_from_tip_window")
   (return-type "gboolean")
   (parameters
@@ -21495,9 +21495,11 @@
   (return-type "gboolean")
 )
 
-(define-function window_list_toplevels
+(define-method list_toplevels
+  (of-object "GtkWindow")
   (c-name "gtk_window_list_toplevels")
   (return-type "GList*")
+  (static #t)
 )
 
 (define-method maximize
diff --git a/ext/gtk+/gtk.overrides b/ext/gtk+/gtk.overrides
index eb20cef..c448ef7 100644
--- a/ext/gtk+/gtk.overrides
+++ b/ext/gtk+/gtk.overrides
@@ -3746,6 +3746,27 @@ PHP_METHOD
 }
 
 %%
+override gtk_window_list_toplevels
+PHP_METHOD
+{
+    GList *list, *tmp;
+
+    list = gtk_window_list_toplevels();
+
+    array_init(return_value);
+    for (tmp = list; tmp != NULL; tmp = tmp->next) {
+        zval *php_item = NULL;
+        phpg_gobject_new(&php_item, G_OBJECT(tmp->data) TSRMLS_CC);
+        if (php_item == NULL) {
+            g_list_free(list);
+            RETURN_NULL();
+        }
+        add_next_index_zval(return_value, php_item);
+    }
+    g_list_free(list);
+}
+
+%%
 add-arginfo GtkWindow set_default_icon_list
 static
 ZEND_BEGIN_ARG_INFO(ARGINFO_NAME, 0)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.