Re: GtkAllocation accessor
- From: Emmanuele Bassi <ebassi gmail com>
- To: Patrick Welche <prlw1 cam ac uk>
- Cc: gtk-list gnome org
- Subject: Re: GtkAllocation accessor
- Date: Wed, 02 Jun 2010 13:31:30 +0100
On Wed, 2010-06-02 at 12:17 +0100, Patrick Welche wrote:
> OK, I shouldn't have mentioned memory. Trying again.
>
> Why was
>
> void gtk_widget_get_allocation(GtkWidget *widget, GtkAllocation *allocation)
>
> chosen, rather than
>
> GtkAllocation *gtk_widget_get_allocation(GtkWidget *widget)
>
> ?
because you always want a copy of the allocation, to avoid third party
code messing up with internal state of the widget.
and because it matches other accessors for structures in GLib and GTK+.
ciao,
Emmanuele.
--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]