[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: calling superclass size_request method
- From: Kevin Ryde <user42 zip com au>
- To: gtk-perl-list gnome org
- Subject: Re: calling superclass size_request method
- Date: Wed, 21 May 2008 08:07:00 +1000
I had a bit of a dig and it turns out g_value_set_boxed as used in
gperl_value_from_sv will copy a GtkRequisition. This means if you call
chain_from_overridden with a given Gtk2::Requisition then the superclass
code doesn't get the pointer to that one, but instead to a copy, so
whatever values it sticks in are lost.
I can't tell at what stage that arg ought to be treated as an "output",
or whose job it ought to be. It doesn't look terribly language-binding
friendly. At any rate perhaps a couple of words for the Gtk2::Widget
docs (though my bad luck continues, "=for position" doesn't seem to do
what I thought it might).
--- GtkWidget.xs 02 Jan 2008 11:18:02 +1100 1.72
+++ GtkWidget.xs 19 May 2008 16:56:36 +1000
@@ -66,6 +66,17 @@
MODULE = Gtk2::Widget PACKAGE = Gtk2::Requisition
+=for position post_signals
+
+Note that currently signal_chain_from_overridden doesn't work from a
+size-request class closure, because the Gtk2::Requisition parameter
+you pass ends up getting copied, so changes made to it by the
+superclass are lost. You can still write a class closure for
+size-request, but you'll have to calculate the desired size by
+yourself, you can't chain up to ask your superclass what it thinks.
+
+=cut
+
gint
width (requisition, newval=NULL)
GtkRequisition * requisition
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]