const char *glade_get_widget_name (GtkWidget *widget);
(function get_widget_name
(c-name glade_get_widget_name)
(return-type const-gchar*)
(parameter (type-and-name GtkWidget* widget))
)
PHP_FUNCTION(glade_get_widget_name)
{
zval *widget;
const gchar *ret;
if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &widget, gtk_widget_ce))
return;
ret = glade_get_widget_name(GTK_WIDGET(PHP_GTK_GET(widget)));
if (ret) {
RETURN_STRING((char *)ret, 1);
}
else {
RETURN_NULL();
}
}