com gtk/php-gtk: Implement GtkTreeView::get_path_at_p os(). Untested.: ext/gtk+/gtktreeview.overrides
[email protected] (David Soria Parra) Sat, 01 Oct 2005 19:32:09 +0000
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 7c55d6a636304af16a4b4d3e478d16c840fca75f=0AAuthor: Andrei Zmi= evski <[email protected]> Sat, 1 Oct 2005 19:32:09 +0000=0AParents: = a13a97aa112f8267680161d18f9927511cc3ba1d=0ABranches: master=0A=0ALink: = http://git.php.net/?p=3Dgtk/php-gtk.git;a=3Dcommitdiff;h=3D7c55d6a636304= af16a4b4d3e478d16c840fca75f=0A=0ALog:=0AImplement GtkTreeView::get_path_at_= pos(). Untested.=0A=0AChanged paths:=0A M ext/gtk+/gtktreeview.overrides= =0A=0A=0ADiff:=0A7c55d6a636304af16a4b4d3e478d16c840fca75f=0Adiff --git a/ex= t/gtk+/gtktreeview.overrides b/ext/gtk+/gtktreeview.overrides=0Aindex 6b009= ac..c78fd79 100644=0A--- a/ext/gtk+/gtktreeview.overrides=0A+++ b/ext/gtk+/= gtktreeview.overrides=0A@@ -616,6 +616,43 @@ PHP_METHOD=0A = cb_data, phpg_cb_data_destroy));= =0A }=0A =0A+%%=0A+override gtk_tree_view_get_path_at_pos=0A+=0A+PHP_METHOD= =0A+{=0A+ gint x, y;=0A+ gint cell_x, cell_y;=0A+ GtkTreePath *pat= h;=0A+ GtkTreeViewColumn *column;=0A+ zval *php_path =3D NULL, *php_c= olumn =3D NULL;=0A+=0A+ NOT_STATIC_METHOD();=0A+ =0A+ if (!php_gtk= _parse_args(ZEND_NUM_ARGS(), "ii", &x, &y)) {=0A+ return;=0A+ }= =0A+=0A+ if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(PHPG_GOBJECT(t= his_ptr)), x, y, &path,=0A+ &column, = &cell_x, &cell_y)) {=0A+ return;=0A+ }=0A+=0A+ array_init(retu= rn_value);=0A+=0A+ if (path) {=0A+ phpg_tree_path_to_zval(path, &= php_path TSRMLS_CC);=0A+ } else {=0A+ MAKE_STD_ZVAL(php_path);=0A= + }=0A+ add_next_index_zval(return_value, php_path);=0A+=0A+ phpg_= gobject_new(&php_column, (GObject*)column TSRMLS_CC);=0A+ add_next_index= _zval(return_value, php_column);=0A+ add_next_index_long(return_value, c= ell_x);=0A+ add_next_index_long(return_value, cell_y);=0A+}=0A+=0A %% }}= }=0A =0A %% {{{ GtkTreeViewColumn=0A