spinning boxes

From: Date: Fri, 13 Jan 2006 12:32:39 +0000
Subject: spinning boxes
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-2193@lists.php.net to get a copy of this message
Hello, While trying to implement gtk_tree_view_column_cell_get_size, I'm stuck because I just can't program C. I did the following: ------- %% {{{ GtkTreeViewColumn %% override gtk_tree_view_column_cell_get_size PHP_METHOD { gint x_offset, y_offset, width, height; GdkRectangle cell_area; zval *cell_area2; NOT_STATIC_METHOD(); if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) { return; } gtk_tree_view_column_cell_get_size(GTK_TREE_VIEW_COLUMN(PHPG_GOBJECT(this_ptr)), &cell_area, &x_offset, &y_offset, &width, &height); phpg_gboxed_new(&cell_area2, GDK_TYPE_RECTANGLE, &cell_area, TRUE, TRUE TSRMLS_CC); php_gtk_build_value(&return_value, "(Viiii)", cell_area2, x_offset, y_offset, width, height); } %% }}} ------- but that doesn't work (segfaults). If you remove the phpg_gboxed_new and return cell_area instead of cell_area, the method works but the first array key is something like > [0]=> > &UNKNOWN:0 So I thought there has to be a call to phpg_gboxed_new, but I just don't know how that works and what it does :/ Steph? -- Regards/MfG, Christian Weiske

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.gtk.dev (#2193) next »