Treepath marshaller

From: Date: Sat, 08 Oct 2005 14:00:39 +0000
Subject: Treepath marshaller
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-1755@lists.php.net to get a copy of this message
Hey Andrei, /* from gtktreemodel.h */ #define GTK_TYPE_TREE_PATH (gtk_tree_path_get_type ()) typedef struct _GtkTreePath GtkTreePath; /* from gtktreemodel.c */ struct _GtkTreePath { gint depth; gint *indices; }; - okay so that means the properties can't be exposed, right? Was there any other reason for complexity, or am I missing something? I've tried implementing GtkTreePath as a boxed object (which it is in GTK+), and all seems groovy. Removing the ignores gives an extra 13 generated methods that may or may not work out of the box (haven't tested all of them yet) and a working constructor - one function's skipped. get_iter() needs an override still, partly because we don't want to pass it an empty iter from PHP-GTK userspace and partly because our return value's different from GTK's return value (ours being of course more sane). %% override gtk_tree_model_get_iter PHP_METHOD { GtkTreeIter iter; GtkTreePath *path; zval *php_path; NOT_STATIC_METHOD(); if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &php_path, gtktreepath_ce)) return; path = (GtkTreePath *) PHPG_GBOXED(php_path); if (gtk_tree_model_get_iter(GTK_TREE_MODEL(PHPG_GOBJECT(this_ptr)), &iter, path)) { gtk_tree_path_free(path); phpg_gboxed_new(&return_value, GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE TSRMLS_CC); } } - notice I'm not using the treepath marshalling here. So my question really is, what was the intention behind the marshaller? - because if it's not needed we'd better kill it, but if it _is_ needed it'd help if I understood why. - Steph

« previous php.gtk.dev (#1755) next »