cvs: php-gtk /generator gtk.overrides /src php_gtk_types.c
| From: | Andrei Zmievski | Date: | Mon, 26 Feb 2001 17:38:13 +0000 |
| Subject: | cvs: php-gtk /generator gtk.overrides /src php_gtk_types.c | ||
| Groups: | php.gtk | ||
| Request: | Send a blank email to php-gtk+get-39@lists.php.net to get a copy of this message | ||
andrei Mon Feb 26 09:38:13 2001 EDT
Modified files:
/php-gtk/generator gtk.overrides
/php-gtk/src php_gtk_types.c
Log:
Allow GtkStyle constructor.
Index: php-gtk/generator/gtk.overrides
diff -u php-gtk/generator/gtk.overrides:1.11 php-gtk/generator/gtk.overrides:1.12
--- php-gtk/generator/gtk.overrides:1.11 Mon Feb 26 06:16:29 2001
+++ php-gtk/generator/gtk.overrides Mon Feb 26 09:38:13 2001
@@ -124,6 +124,7 @@
gtk_radio_menu_item_set_group
gtk_radio_button_group
gtk_radio_button_set_group
+ gtk_style_new
%%
ignore
gtk_object_new
Index: php-gtk/src/php_gtk_types.c
diff -u php-gtk/src/php_gtk_types.c:1.12 php-gtk/src/php_gtk_types.c:1.13
--- php-gtk/src/php_gtk_types.c:1.12 Sat Feb 24 15:55:07 2001
+++ php-gtk/src/php_gtk_types.c Mon Feb 26 09:38:13 2001
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: php_gtk_types.c,v 1.12 2001/02/24 23:55:07 andrei Exp $ */
+/* $Id: php_gtk_types.c,v 1.13 2001/02/26 17:38:13 andrei Exp $ */
#include "php_gtk.h"
@@ -1260,7 +1260,6 @@
else if (!strcmp(prop_name, "background")) {
GdkGCValues gcv;
gdk_gc_set_background(gc, c);
- gdk_gc_get_values(gc, &gcv);
}
else {
php_error(E_WARNING, "'%s' property should be a GdkColor", prop_name);
@@ -1548,6 +1547,17 @@
/* GtkStyle */
+PHP_FUNCTION(gtkstyle)
+{
+ GtkStyle *ret;
+
+ if (!php_gtk_parse_args(ZEND_NUM_ARGS(), ""))
+ return;
+
+ ret = gtk_style_new();
+ *return_value = *php_gtk_style_new(ret);
+}
+
PHP_FUNCTION(gtk_style_copy)
{
GtkStyle *style;
@@ -1563,7 +1573,7 @@
}
static function_entry php_gtk_style_functions[] = {
- {"gtkstyle", PHP_FN(wrap_no_direct_constructor), NULL},
+ {"gtkstyle", PHP_FN(gtkstyle), NULL},
{"copy", PHP_FN(gtk_style_copy), NULL},
{NULL, NULL, NULL}
};