Re: GtkTreeView get_cursor patch
| From: | Andrei Zmievski | Date: | Fri, 24 Feb 2006 05:00:44 +0000 |
| Subject: | Re: GtkTreeView get_cursor patch | ||
| References: | 1 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-2433@lists.php.net to get a copy of this message | ||
Applied, with some modifications.
-Andrei
On Feb 14, 2006, at 8:57 AM, Adam Lebsack wrote:
Hey guys, 've been doing some development with php-gtk2 and I needed a function implemented, so I uhhh... implemented it. It's GtkTreeView::get_cursor. I've included the patch. Could we get this override into the CVS tree? Thanks! Adam Lebsack --- php-gtk/ext/gtk+/gtktreeview.overrides 2006-02-13 20:09:54.000000000 -0700 +++ php-gtk.patched/ext/gtk+/gtktreeview.overrides 2006-02-10 16:39:30.000000000 -0700 @@ -1020,6 +1020,32 @@ } %% +override gtk_tree_view_get_cursor +PHP_METHOD +{+ GtkTreePath *path = NULL; + GtkTreeViewColumn *column = NULL; + zval *php_path = NULL, *php_column = NULL;++ NOT_STATIC_METHOD(); + gtk_tree_view_get_cursor(GTK_TREE_VIEW(PHPG_GOBJECT(this_ptr)), &path, &column);++ array_init(return_value); + if (path) { + phpg_tree_path_to_zval(path, &php_path TSRMLS_CC); + phpg_gobject_new(&php_column, (GObject*)column TSRMLS_CC);++ array_init(return_value); + add_next_index_zval(return_value, php_path); + add_next_index_zval(return_value, php_column); + } else { + RETURN_FALSE; + //MAKE_STD_ZVAL(php_path); + //MAKE_STD_ZVAL(php_column); + }+} + +%% add-arginfo GtkTreeView get_path_at_pos static ZEND_BEGIN_ARG_INFO(ARGINFO_NAME, 0) --PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php