Re: gdk*_ce exporting question.
| From: | xxoes | Date: | Fri, 10 Mar 2006 18:33:05 +0000 |
| Subject: | Re: gdk*_ce exporting question. | ||
| References: | 1 2 3 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-2592@lists.php.net to get a copy of this message | ||
but gdkpixbuf_ce didn't work.
i have test it on libglade extension
if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &widget, gtkwidget_ce))
replaced with:
if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &widget, gdkpixbuf_ce))
and there are the same problem he can resolv gdkpixbuf.
With this code i can check if this is a GdkPixbuf object:
if(Z_TYPE_P(pixbuf) == IS_OBJECT) {
char *class_name = 0;
zend_uint class_name_len;
zend_get_object_classname(pixbuf,&class_name,&class_name_len TSRMLS_CC);
if(strcmp("GdkPixbuf",class_name)) {
php_error(E_WARNING, "%s::%s(): expects argument 1 to be GdkPixbuf, %s given", get_active_class_name(NULL TSRMLS_CC), get_active_function_name(TSRMLS_C),class_name);
return;
}
}
else {
php_error(E_WARNING, "%s::%s(): expects argument 1 to be GdkPixbuf, non-object given", get_active_class_name(NULL TSRMLS_CC), get_active_function_name(TSRMLS_C));
return;
}
mfg xxoes
(sorry for my english ;))
Andrei Zmievski schrieb:
This is wrong. You need to check for the class of the object. Can someone on Win32 help him please? On Mar 10, 2006, at 6:00 AM, xxoes wrote:I have a solution.: static ZEND_BEGIN_ARG_INFO(arginfo_....., 0) ZEND_ARG_OBJ_INFO(0, pixbuf, GdkPixbuf, 1) ZEND_END_ARG_INFO(); and if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "z", &pixbuf)) {return;} now it works fine for me. mfg xxoes xxoes schrieb:I'm writing an extension for me, but i have problems with the gdk*_ce exports, gtk*_ce works fine but not gdk if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &pixbuf, gdkpixbuf_ce)) {-- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpPHPG_THROW_CONSTRUCT_EXCEPTION(GtkInvisible);} The compiler say's: gen_test.obj : error LNK2019: unresolved external symbol __imp__gdkpixbuf_ce referenced in function _zif_test_test with gtkwindow_ce it works fine. How can i get a GdkPixbuf aobject as an argument to my method? mfg xxoes