com gtk/php-gtk: Implement GtkTreeView::get_path_at_p os(). Untested.: ext/gtk+/gtktreeview.overrides

From: Date: Sat, 01 Oct 2005 19:32:09 +0000
Subject: com gtk/php-gtk: Implement GtkTreeView::get_path_at_p os(). Untested.: ext/gtk+/gtktreeview.overrides
Groups: php.gtk.cvs 
Request: Send a blank email to php-gtk-cvs+get-4795@lists.php.net to get a copy of this message
Commit: 7c55d6a636304af16a4b4d3e478d16c840fca75f Author: Andrei Zmievski <andrei@php.net> Sat, 1 Oct 2005 19:32:09 +0000 Parents: a13a97aa112f8267680161d18f9927511cc3ba1d Branches: master Link: http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=7c55d6a636304af16a4b4d3e478d16c840fca75f Log: Implement GtkTreeView::get_path_at_pos(). Untested. Changed paths: M ext/gtk+/gtktreeview.overrides Diff: 7c55d6a636304af16a4b4d3e478d16c840fca75f diff --git a/ext/gtk+/gtktreeview.overrides b/ext/gtk+/gtktreeview.overrides index 6b009ac..c78fd79 100644 --- a/ext/gtk+/gtktreeview.overrides +++ b/ext/gtk+/gtktreeview.overrides @@ -616,6 +616,43 @@ PHP_METHOD cb_data, phpg_cb_data_destroy)); } +%% +override gtk_tree_view_get_path_at_pos + +PHP_METHOD +{ + gint x, y; + gint cell_x, cell_y; + GtkTreePath *path; + GtkTreeViewColumn *column; + zval *php_path = NULL, *php_column = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ii", &x, &y)) { + return; + } + + if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(PHPG_GOBJECT(this_ptr)), x, y, &path, + &column, &cell_x, &cell_y)) { + return; + } + + array_init(return_value); + + if (path) { + phpg_tree_path_to_zval(path, &php_path TSRMLS_CC); + } else { + MAKE_STD_ZVAL(php_path); + } + add_next_index_zval(return_value, php_path); + + phpg_gobject_new(&php_column, (GObject*)column TSRMLS_CC); + add_next_index_zval(return_value, php_column); + add_next_index_long(return_value, cell_x); + add_next_index_long(return_value, cell_y); +} + %% }}} %% {{{ GtkTreeViewColumn

« previous php.gtk.cvs (#4795) next »