[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-gtk-cvs
Subject:    [php-gtk-cvs] com gtk/php-gtk: Allow GtkStyle constructor.: generator/gtk.overrides =?UTF-8?Q?main/p
From:       David Soria Parra <dsp () php ! net>
Date:       2001-02-26 17:38:13
Message-ID: php-mail-fcd885a8d3e59c0df812e1965ebd069b1011535998 () git ! php ! net
[Download RAW message or body]

Commit:    e23795ca671a75189ebe7b7723fbec2f095eb3f5
Author:    Andrei Zmievski <andrei@php.net>         Mon, 26 Feb 2001 17:38:13 +0000
Parents:   cb2df20aefe53056bae5840fe45ff87752fd0dfc
Branches:  GTK2 PHP_GTK_1 ZE2_PORT devel master

Link:       http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=e23795ca671a75189ebe7b7723fbec2f095eb3f5

Log:
Allow GtkStyle constructor.

Changed paths:
  M  generator/gtk.overrides
  M  main/php_gtk_types.c


Diff:
e23795ca671a75189ebe7b7723fbec2f095eb3f5
diff --git a/generator/gtk.overrides b/generator/gtk.overrides
index 15bf598..1bd7aa0 100644
--- a/generator/gtk.overrides
+++ b/generator/gtk.overrides
@@ -124,6 +124,7 @@ ignore
 	gtk_radio_menu_item_set_group
 	gtk_radio_button_group
 	gtk_radio_button_set_group
+	gtk_style_new
 %%
 ignore
 	gtk_object_new
diff --git a/main/php_gtk_types.c b/main/php_gtk_types.c
index cd955e6..fca40ff 100644
--- a/main/php_gtk_types.c
+++ b/main/php_gtk_types.c
@@ -1260,7 +1260,6 @@ static int gdk_gc_set_property(zval *object, zend_llist_element **element, zval
 		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 @@ static void release_gtk_accel_group_rsrc(zend_rsrc_list_entry *rsrc)
 
 
 /* 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 @@ PHP_FUNCTION(gtk_style_copy)
 }
 
 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}
 };


--
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic