com gtk/php-gtk: Setting the allocation type to mixed instead of the automatically defined, not existing GtkAllocation class: ext/gtk+/gtk.overrides

[email protected] (David Soria Parra)
Newsgroups php.gtk.cvs
Message-ID <[email protected]>
Commit:    bd8245c3eb559b67fbc0440c0c9c09fa596fbd3d
Author:    Christian Weiske <[email protected]>         Wed, 28 Jun 2006 20:14:42 +0000
Parents:   f541b7a2b110ca77bc98042f7655a6a935438968
Branches:  master

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

Log:
Setting the allocation type to mixed instead of the
automatically defined, not existing GtkAllocation class

Changed paths:
  M  ext/gtk+/gtk.overrides


Diff:
bd8245c3eb559b67fbc0440c0c9c09fa596fbd3d
diff --git a/ext/gtk+/gtk.overrides b/ext/gtk+/gtk.overrides
index 723fab0..73312a4 100644
--- a/ext/gtk+/gtk.overrides
+++ b/ext/gtk+/gtk.overrides
@@ -4208,6 +4208,33 @@ PHP_METHOD
 }
 
 %%
+add-arginfo GtkWidget size_allocate
+static
+ZEND_BEGIN_ARG_INFO(ARGINFO_NAME, 0)
+    ZEND_ARG_INFO(0, allocation)
+ZEND_END_ARG_INFO();
+
+%%
+override gtk_widget_size_allocate
+PHP_METHOD
+{
+    GdkRectangle allocation = { 0, 0, 0, 0 };
+    zval *php_allocation;
+
+    NOT_STATIC_METHOD();
+
+    if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "V", &php_allocation))
+        return;
+
+    if (phpg_rectangle_from_zval(php_allocation, &allocation TSRMLS_CC) == FAILURE) {
+        php_error(E_WARNING, "%s::%s() expects allocation argument to be either a 4-element array or a GdkRectangle object", get_active_class_name(NULL TSRMLS_CC), get_active_function_name(TSRMLS_C));
+        return;
+    }
+    gtk_widget_size_allocate(GTK_WIDGET(PHPG_GOBJECT(this_ptr)), &allocation);
+
+}
+
+%%
 add-arginfo GtkWidget translate_coordinates
 static
 ZEND_BEGIN_ARG_INFO(ARGINFO_NAME, 0)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.